Monthly top 10 popular tags


Please login or register to vote for this query.

(click on this box to dismiss)

Space Exploration

Q&A for spacecraft operators, scientists, engineers, and enthusiasts

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