SELECT /* Selected fields from the 'notes' and 'user' tables */ n.id, n."createdAt", n.text, n.reactions, u.id, u.username FROM public.note n /* Join to the 'user' table */ INNER JOIN public.user u ON n."userId" = u.id /* Condition */ WHERE n."userId" = 'user_id_goes_here' /* Return 250 records, Ascending */ ORDER BY "userId" ASC LIMIT 250;