Number of questions, answers, and comments in SO


Please login or register to vote for this query.

(click on this box to dismiss)

Earth Science

Q&A for those interested in the geology, meteorology, oceanography, and environmental sciences

-- 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

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