Number of questions, answers, and comments in SO

0

Please login or register to vote for this query.

(click on this box to dismiss)

Music Fans Meta

Q&A about the site for music historians, critics, and fans

-- Number of Questions
SELECT COUNT(*) AS QuestionCount
FROM Posts
WHERE PostTypeId = 1;

-- Number of Answers (Your Base Code)
SELECT COUNT(*) AS AnswerCount
FROM Posts
WHERE PostTypeId = 2;

-- Number of Comments
SELECT COUNT(*) AS CommentCount
FROM Comments;

Enter Parameters

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