Skip to content

Instantly share code, notes, and snippets.

Created May 14, 2017 09:47
What would you like to do?
Avoid Joins: Join Query
SELECT "purchase"."id"
FROM "purchase"
INNER JOIN "user" ON ("purchase"."user_id" = "user"."id")
WHERE "user"."account_id" IN
(SELECT generate_series(1,1000));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment