Top N tags relative popularity history

3

Please login or register to vote for this query.

(click on this box to dismiss)

Shows the most popular tags in percent of all questions asked in the month

Emacs

Q&A for those using, extending or developing Emacs

WITH TopTags AS (
  SELECT TOP ##TopN:INT?10## Id, TagName
  FROM Tags
  ORDER BY Count DESC
),
PostTagMonth AS (
  SELECT
    DATEFROMPARTS(
      DATEPART(yyyy, CreationDate),
      DATEPART(mm, CreationDate),
    1) AS Month,
    TopTags.TagName
  FROM Posts, PostTags, TopTags
  WHERE
    TopTags.Id = PostTags.TagId
    AND
    Posts.Id = PostTags.PostId
)
SELECT Month, TagName, COUNT(*) AS N
FROM PostTagMonth
GROUP BY Month, TagName
ORDER BY Month, TagName

Enter Parameters

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