Most popular StackOverflow Tags Last Month >= 5000 Questions

1

Please login or register to vote for this query.

(click on this box to dismiss)

Cardano Meta

Q&A for users and developers of the Cardano cryptocurrency ecosystem

-- Most popular StackOverflow Tags Last Month >= 5000 Questions

SELECT postsQuestions.TagName                                  AS Tag
      ,row_number() over (order by postsMonth.postsCount desc) AS Rank
      ,postsMonth.postsCount                                   AS Questions
FROM  
  (SELECT COUNT(PostId) AS postsCount
         ,TagName
   FROM   Tags
         ,PostTags
         ,Posts
   WHERE  Tags.Id  = PostTags.TagId AND
          Posts.Id = PostId         AND
          Posts.CreationDate >= MONTH(DATEADD(MONTH, -1, CURRENT_TIMESTAMP))
   GROUP BY TagName
   ) AS postsMonth
INNER JOIN
  (SELECT COUNT(PostId) AS postsQuestions
         ,TagName
   FROM   Tags
         ,PostTags
         ,Posts
   WHERE  Tags.Id  = PostTags.TagId AND
          Posts.Id = PostId
   GROUP BY TagName
   HAVING COUNT(PostId) > 5000
   ) AS postsQuestions  
ON postsMonth.TagName = postsQuestions.TagName
ORDER BY postsMonth.postsCount DESC
;

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results