Number of questions, answers, and comments in SO

0

Please login or register to vote for this query.

(click on this box to dismiss)

スタック・オーバーフロー

プログラマーとプログラミングに熱心な人々のための質問と回答

-- 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 meta site
loading Hold tight while we fetch your results