Timeline of Questions & Answers Posted per Month

1

Please login or register to vote for this query.

(click on this box to dismiss)

Totals of the amount of questions, answers, and questions & answers combined posted on [site] over time, grouped by year-month.

Meta Stack Exchange

Q&A for meta-discussion of the Stack Exchange family of Q&A websites

DECLARE @SEDEUpdated AS DATETIME = (SELECT TOP 1 LastAccessDate FROM Users ORDER BY LastAccessDate DESC)

SELECT
  DATEFROMPARTS(YEAR(p.CreationDate), MONTH(p.CreationDate), 1) AS [Year-Month .],
  COUNT(*) AS [Qs & As],
  COUNT(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE NULL END) AS [Qs],
  COUNT(CASE WHEN p.PostTypeId = 2 THEN 1 ELSE NULL END) AS [As]
FROM PostsWithDeleted p
WHERE p.CreationDate < DATEFROMPARTS(YEAR(@SEDEUpdated), MONTH(@SEDEUpdated), 1) -- Only include months prior to latest SEDE update (incomplete data)
  AND p.PostTypeId IN (1,2) -- Limit posts to Qs & As
GROUP BY DATEFROMPARTS(YEAR(p.CreationDate), MONTH(p.CreationDate), 1)
ORDER BY DATEFROMPARTS(YEAR(p.CreationDate), MONTH(p.CreationDate), 1) DESC

Enter Parameters

Options:
Switch sites
loading Hold tight while we fetch your results