TODO: compare from two different dateranges...
Q&A for professional and enthusiast programmers
-- QUERY: count tags from daterange -- TODO: compare from two different dateranges... select TOP 10 tags.tagname, count(*) AS tagcount from Posts INNER JOIN PostTags ON PostTags.PostId = Posts.id INNER JOIN Tags ON Tags.id = PostTags.TagId where datepart(year, Posts.CreationDate) = 2011 and datepart(month, Posts.CreationDate) = 1 Group by tags.tagname Order by tagcount DESC