open_in_new
content_copy
SELECT *, count(*) OVER() AS full_count FROM tbl WHERE /* whatever */ ORDER BY col1 LIMIT ? OFFSET ?