I have a SQL statement
select *
from users u left join files f
on u.id = f.user_id
where f.mime_type = 'jpg'
order by u.join_date desc
limit 10 offset 10
1-N Ratio: A user can have many files.
This effectively selects the second 10-element page.
The problem is that this query limits / cancels the joined table, but I want to limit / offset different rows from the first table ( users).
How? I am targeting PostgreSQL and HSQLDB
source
share