Q&A for professional and enthusiast programmers
-- Most popular StackOverflow tags select rate.Yr as yr, num.TagName as Tag, -- row_number() over (order by num.Num desc) as TotalRank, num.Num as QuestionsTotal from (select count(PostId) as Rate, TagName, year(Posts.CreationDate) as yr from Tags, PostTags, Posts where Tags.Id = PostTags.TagId and Posts.Id = PostId -- and Posts.CreationDate < '2010-06-01' -- and year(Posts.CreationDate) = 2016 group by TagName, year(Posts.CreationDate)) as rate INNER JOIN (select top 20 count(PostId) as Num, TagName, year(Posts.CreationDate) as yr from Tags, PostTags, Posts where Tags.Id = PostTags.TagId and Posts.Id = PostId group by TagName, year(Posts.CreationDate) having count(PostId) > 5000) as num ON rate.TagName = num.TagName and rate.yr = num.yr order by yr asc, num.Num desc ;