Q&A about the site for people studying math at any level and professionals in related fields
/* 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 This is a bit difficult to give one set answer. There are 41,202,198 records in the posts table. 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