Q&A for professionals and students of engineering
DECLARE @Last30 datetime = DATEADD(month, -1, GETDATE()) DECLARE @60aaa datetime = DATEADD(month, -1, GETDATE()) DECLARE @Last90 datetime = DATEADD(month, -1, GETDATE()) SELECT --TOP 20 TagName, COUNT(*) AS Posts FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId where tagname = 'angularjs' AND posts.creationdate > @Last30 group by tagname SELECT --TOP 20 TagName, COUNT(*) AS Posts FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId where tagname = 'knockout.js' AND posts.creationdate > @Last30 group by tagname