Unanswered Questions per Top 5 Tags (Per Month)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Monero Meta

Q&A about the site for developers and users of the secure, private and untraceable cryptocurrency Monero

SELECT *, COUNT(*) AS Count FROM
(
  SELECT CAST(
      CAST(DATEPART(YYYY, CreationDate) AS varchar) + '-' + CAST(DATEPART(MM, CreationDate) AS varchar) + '-01'
    AS DATETIME) [Month], 
    t.TagName,
    (select count(*) FROM Posts pp where pp.ParentId = p.id) AS [Answers]
  FROM Posts p 
  JOIN PostTags pt ON pt.PostId = p.Id
  JOIN Tags t ON t.Id = pt.TagId
  AND TagId IN 
  (
    SELECT TOP 500 Id FROM Tags 
    ORDER BY Count DESC
  )
) AS X
WHERE [Month] >= CAST('2012-01-01' as datetime)
AND [Month] < CAST('2012-12-01' as datetime)
AND [Answers] = 0
GROUP BY TagName, Answers, [Month]
ORDER BY [Month] ASC, TagName ASC

Enter Parameters

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