cl-dbi icon indicating copy to clipboard operation
cl-dbi copied to clipboard

Range of elements

Open asarch opened this issue 5 years ago • 1 comments
trafficstars

How could I do this query (from PostgreSQL SQL dialect)?

SELECT * FROM student ORDER BY id DESC LIMIT (20-10+1) OFFSET 10;

asarch avatar Apr 22 '20 04:04 asarch

(ql:quickload :sxql)

(select :*
  (from (:student))
  (order-by :id (:desc :id))
  (limit (- 20 (+ 10 1)))
  (offset 10))

P.S.

This questions was not for here, it was for SxQL.

Sorry, sorry.

asarch avatar Apr 23 '20 04:04 asarch