Draft

0

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

SELECT
  TagName,
  ROW_NUMBER() OVER (
    ORDER BY
      COUNT(*) DESC
  ) AS RANK,
  COUNT(*) AS Questions
FROM
  Tags t,
  PostTags pt,
  Posts p
WHERE
  t.Id = pt.TagId
  AND p.Id = pt.PostId
  AND TagName IN ( ##Keywords## )
  AND p.CreationDate < dateadd(MONTH, datediff(MONTH, 0, getdate()), 0)
  AND p.CreationDate > dateadd(MONTH, datediff(MONTH, 0, getdate()) - 24, 0)
  AND p.PostTypeId = 1
GROUP BY
  TagName

Enter Parameters

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