SELECT count(*) as numberofcomments, postid FROM posts JO...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Lifehacks

Q&A for people looking to bypass life's everyday problems with simple tricks

SELECT count(*) as numberofcomments, postid FROM posts JOIN comments
ON posts.id = comments.postid
GROUP BY postid

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results