Skip to content

Instantly share code, notes, and snippets.

@ketanbhatt

ketanbhatt/join.sql

Created May 14, 2017
Embed
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
You can’t perform that action at this time.