Average number of undeleted questions per day per month since site inception

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT
  DATEFROMPARTS(YEAR([Date]), MONTH([Date]), 1) AS [Month],
  AVG([Count]) AS [Average Questions / Day / Month]
FROM (
  SELECT
    DATEFROMPARTS(YEAR(CreationDate), MONTH(CreationDate), DAY(CreationDate)) AS [Date],
    COUNT(*) AS [Count]
  FROM Posts
  WHERE PostTypeId = 1 -- question
  GROUP BY YEAR(CreationDate), MONTH(CreationDate), DAY(CreationDate)
  -- ORDER BY [Date]
) AS QuestionsPerDay
GROUP BY YEAR([Date]), MONTH([Date])
ORDER BY [Month]

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached