-- Questions by month per tag
-- Question count for a particular tag
select
datepart(year, p.CreationDate) Year,
datepart(month, p.CreationDate) Month,
count(*) as ##Tag:string##
from Posts p
join PostTags pt on pt.PostId = p.Id
join Tags t on t.Id = pt.TagId
where t.TagName = ##Tag:string## and p.PostTypeId = 1
group by datepart(year, p.CreationDate), datepart(month, p.CreationDate)
order by datepart(year, p.CreationDate) desc, datepart(month, p.CreationDate) desc