SQL Tested
Keyset (cursor) pagination instead of OFFSET
Page through large tables quickly and stably by filtering on the last seen sort key.
Queries for PostgreSQL and other relational databases.
Loading snippets…
15 snippets
Page through large tables quickly and stably by filtering on the last seen sort key.
List values that appear more than once with GROUP BY and HAVING, including how many times.
Remove duplicates in PostgreSQL using ROW_NUMBER over a partition, keeping one row per key.