Q&A for developers and researchers interested in open data
select tmp.yearmon as YEARMON,
tmp.tagname as TAGNAME,
count(*) as COUNT FROM (
CAST(DATEPART(YYYY, CreationDate) as varchar) + '-' +
CAST(DATEPART(MM, CreationDate) as varchar) + '-01'
as date) yearmon, -- Is there a better way to do this?
t.TagName as tagname
from Posts p
join PostTags pt on pt.PostId = p.Id
join Tags t on t.Id = pt.TagId
where t.TagName in ('r', 'pandas', 'julia', 'excel', 'spss', 'sas')
group by YEARMON, TAGNAME
order by YEARMON DESC, TAGNAME ASC