Posts per month (answers and questions)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mythology Meta

Q&A about the site for enthusiasts and scholars of mythology and folklore

SELECT
    DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) AS Month,
    SUM(CASE WHEN PostTypeId = 1 THEN 1 ELSE 0 END) AS QuestionCount,
    SUM(CASE WHEN PostTypeId = 2 THEN 1 ELSE 0 END) AS AnswerCount
FROM
    Posts
GROUP BY
    DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0)
ORDER BY
    Month;

Enter Parameters

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