Postgresql limita la cantidad de resultados devueltos
consulta TOP-N
select first_name,last_name,salary
from employees
order by salary
fetch first 10 rows only;
select first_name,last_name,salary
from employees
order by salary
limit 10;
select first_name,last_name,salary
from employees
order by salary
fetch first 10 rows with ties;
consulta de paginación
SELECT first_name, last_name, salary
FROM employees
ORDER BY salary DESC
OFFSET 10 ROWS
FETCH FIRST 10 ROWS ONLY;
SELECT first_name, last_name, salary
FROM employees
ORDER BY salary DESC
LIMIT 10 OFFSET 20;
Resumir