Percentage of closed, deleted questions per month over time

1

Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

SELECT
  DATEFROMPARTS(
    DATEPART(yyyy, CreationDate),
    DATEPART(mm, CreationDate),
    1) AS Month,
  COUNT(*) AS AllQuestions,
  COUNT(DeletionDate) AS Deleted,
  COUNT(CASE
    WHEN DeletionDate IS NULL AND ClosedDate IS NOT NULL THEN 1
    ELSE NULL
  END) AS Closed,
  COUNT(CASE
    WHEN DeletionDate IS NULL AND ClosedDate IS NULL THEN 1
    ELSE NULL
  END) AS [Open]
FROM PostsWithDeleted
WHERE PostTypeId=1
GROUP BY DATEFROMPARTS(
    DATEPART(yyyy, CreationDate),
    DATEPART(mm, CreationDate),
    1)
ORDER BY Month

Enter Parameters

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