Created
October 31, 2019 06:15
-
-
Save renganatha10/ef80c65af03f8e610c1d6706a43df0e8 to your computer and use it in GitHub Desktop.
POSTGRES.sql
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 (SELECT pl.id, pl."postId" FROM "PostLikes" as pl where "Posts".id = pl."postId" ) as postCount, "Posts"."id" as "postId" FROM "Posts" | |
INNER JOIN "Users" as "user" ON "Posts"."userId" = "user"."id" | |
WHERE "Posts"."userId" = '40f7198d-6851-4e19-94fb-df0094b84bb6' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment