Monthly top 10 popular tags


Please login or register to vote for this query.

(click on this box to dismiss)

Board and Card Games

Q&A for people who like playing board games, designing board games or modifying the rules of existing board games

SELECT [Month], Tag, QuestionCount
  FROM (
SELECT [Month], Tag, QuestionCount, ROW_NUMBER() OVER (PARTITION BY [Month] ORDER BY QuestionCount DESC) QCRank
  FROM (
    SELECT [Month], Tag, COUNT(*) QuestionCount
      FROM (
        SELECT MONTH(CreationDate) [Month], p.Id, t.Tag
          FROM Posts p
         OUTER APPLY (
                 SELECT REPLACE(REPLACE(value, '<', ''), '>', '') Tag
                   FROM STRING_SPLIT(p.Tags, '>')
                  WHERE LEN(value) > 0) t
         WHERE PostTypeId = 1 
           AND YEAR(CreationDate) = ##Year:int##) raw -- questions
         GROUP BY [Month], Tag) a1) a2
 WHERE a2.QCRank <= 10
 ORDER BY a2.[Month], a2.QCRank

Enter Parameters

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