Top 10 Tags by Year, Month Since 2010

1

Please login or register to vote for this query.

(click on this box to dismiss)

Internet of Things Meta

Q&A about the site for builders and users of networked sensors and control devices in the contexts of smart homes, industry automation, or environmental sensors

SELECT * FROM 
  (SELECT
    YEAR(CreationDate) as CreationYear,
    MONTH(CreationDate) as CreationMonth,
    TagName,
    COUNT(PostId) as PostCount,
    RANK() OVER (PARTITION BY YEAR(CreationDate), MONTH(CreationDate) ORDER BY COUNT(PostId) DESC) AS Rank
  FROM
    Tags, PostTags, Posts
  WHERE 
    Tags.Id = PostTags.TagId and Posts.Id = PostId
  GROUP BY YEAR(CreationDate), MONTH(CreationDate), TagName)
  AS TagPostRankings
WHERE 
  Rank <= 10 AND 
  CreationYear >= 2010
ORDER BY CreationYear, CreationMonth, Rank

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results