Q&A about the site for music historians, critics, and fans
SELECT TOP 10 Tags.TagName AS Subject, COUNT(*) AS QuestionCount, SUM(Questions.ViewCount) AS TotalViewCount FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId JOIN Posts AS Questions ON PostTags.PostId = Questions.Id WHERE Questions.PostTypeId = 1 -- Questions only AND Questions.CreationDate >= DATEADD(year, -1, GETDATE()) -- Within the last year GROUP BY Tags.TagName ORDER BY QuestionCount DESC;