Created
May 14, 2017 09:47
-
-
Save ketanbhatt/5699b09bee5475e3f7dcef5abd128f4b to your computer and use it in GitHub Desktop.
Avoid Joins: Join Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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