/* What is the most number of comments on a single post? ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Health Meta

Q&A for medical specialists, students, dietitians, and anyone with health-related questions

/*
What is the most number of comments on a single post?
select id, commentcount
from posts
order by commentcount desc

How many posts have the exact same number of answers?
select answercount Tot_Ans_For_A_Post, count(id) Tot_Num_of_Post
from posts
group by answercount

Bonus:
What is the current highest scored comment, and what post does it belong to?

select id Comment_ID, postid Post_ID, score Comment_Score
from comments
where score = (SELECT MAX(score) FROM comments)

Comment_ID  Post_ID  Comment_Score
8132455     6841333  1249
*/

select answercount Tot_Ans_For_A_Post, count(id) Tot_Num_of_Post
from posts
group by answercount

Enter Parameters

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