new answers per month since 2018

0

Please login or register to vote for this query.

(click on this box to dismiss)

Code Golf and Coding Challenges

Q&A for programming puzzle enthusiasts and code golfers

SELECT
  DATEFROMPARTS(YEAR(P.CreationDate), MONTH(P.CreationDate), 1) AS Date,
  CASE WHEN P.DeletionDate IS NULL THEN 'non-deleted' ELSE 'deleted' END AS Status,
  COUNT(*) AS NewAnswers
FROM PostsWithDeleted P
WHERE P.PostTypeId = 2 -- Answers
  AND YEAR(P.CreationDate) >= 2020
GROUP BY
  DATEFROMPARTS(YEAR(P.CreationDate), MONTH(P.CreationDate), 1),
  CASE WHEN P.DeletionDate IS NULL THEN 'non-deleted' ELSE 'deleted' END
ORDER BY Date

Enter Parameters

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