Compare Questions and Answers by Tag By Month

1

Please login or register to vote for this query.

(click on this box to dismiss)

Genealogy and Family History Meta

Q&A about the site for expert genealogists and people interested in genealogy or family history

select *, count(*) from
(
  select CAST(
      cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
    as datetime) [Month], 
    t.TagName
  from PostsWithDeleted p 
  join PostTags pt on pt.PostId = p.Id
  join Tags t on t.Id = pt.TagId
  where TagName in 
  (
    SELECT TOP 10 TagName
    FROM Tags
    ORDER BY Tags.[Count] DESC
  )
) as X
group by TagName, [Month]
order by [Month] asc, TagName asc

Enter Parameters

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