Tag statistics by month

0

Please login or register to vote for this query.

(click on this box to dismiss)

Views, Score and Answers per Game (with limited blacklist for other tags)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

-- Tag statistics
-- Views, Score and Answers per Tag

SELECT 
    Tags.Tagname AS Tag, 
    sum(1) AS Amount,
    CAST(MONTH(Posts.CreationDate) AS VARCHAR(2)) + '-' + CAST(YEAR(Posts.CreationDate) AS VARCHAR(4)) AS ym
  FROM Posts 
  JOIN PostTags ON Posts.Id = PostTags.PostId
  JOIN Tags ON PostTags.TagId = Tags.Id
  WHERE Posts.PostTypeId = 1 
  GROUP BY Tags.Tagname, CAST(MONTH(Posts.CreationDate) AS VARCHAR(2)) + '-' + CAST(YEAR(Posts.CreationDate) AS VARCHAR(4))
  ORDER BY ym DESC

Enter Parameters

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