TAGS INFORMATION

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT * FROM
(SELECT "tag"."id" as "tag_id", COUNT("post"."id") as "totalQuestions"
FROM "Tags" "tag" LEFT JOIN "PostTags" "post_tag" 
ON "post_tag"."tagId"="tag"."id" 
LEFT JOIN "Posts" "post" 
ON "post"."id"="post_tag"."postId" 
GROUP BY "tag"."id") "y"
LEFT JOIN "Tags" "x" on "x"."id" = "y"."tag_id"

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results