forked from a different pre-existing query. Querying the entire database might result in timeouts, but fot a smaller timerange it does work.
This query helps to visualize trends in popularity. However, stackoverflow is growing, so most tags will show an increasing trend as well, assuming they are a representative sample for the (statistical) population of tags.
Q&A for amateur radio enthusiasts
Declare @Tag varchar(20)
set @Tag = ##tag:string##
sum(case when PostTypeId = 1 then 1 else 0 end) as Questions_for_Tag
cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
as datetime) [Month],
from Posts p
where [Tags] like '%' + @Tag + '%'
and year(CreationDate) >= 2010
) as X
group by [Month]
order by [Month] asc