Q&A for SharePoint enthusiasts
-- Questions per tag last 6 months SELECT tagname, COUNT(p.id) k FROM Posts p INNER JOIN PostTags pt ON p.iD = pt.PostId INNER JOIN Tags t ON pt.TagID = t.Id WHERE p.PostTypeId = 1 and p.creationDate > DATEADD(Month, -6, DATEADD(dd, DATEDIFF(dd, 0, getdate()), 0) ) GROUP BY tagName