Sample Posts and Comments query

0

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 top 100 Posts.Id,count(Comments.Id)
from Comments
inner join Posts on Comments.PostId=Posts.Id
group by Posts.Id

Enter Parameters

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