Q&A for professional and enthusiast programmers
WITH QuestionsByMonth AS ( SELECT DATEADD (month, DATEDIFF (month, 0, q.CreationDate), 0) AS [Month], q.Id AS id FROM Posts q INNER JOIN PostTags pt ON q.Id = pt.PostId INNER JOIN Tags t ON t.Id = pt.TagId WHERE q.PostTypeId = 1 AND t.TagName = 'perl' ) SELECT q.[Month], COUNT(q.id) AS Qs FROM QuestionsByMonth q GROUP BY q.[Month] ORDER BY q.[Month]