Tag count by date

0

Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair

Q&A for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

select t.TagName,
count(case when p.CreationDate between '2020-1-1' and '2020-7-1' then 1 else null end) as Jul2020,
count(case when p.CreationDate between '2020-7-1' and '2021-1-1' then 1 else null end) as Jan2021,
count(case when p.CreationDate between '2021-1-1' and '2021-7-1' then 1 else null end) as Jul2021,
count(case when p.CreationDate between '2021-7-1' and '2022-1-1' then 1 else null end) as Jan2022,
count(case when p.CreationDate between '2022-1-1' and '2022-7-1' then 1 else null end) as Jul2022,
count(case when p.CreationDate between '2022-7-1' and '2023-1-1' then 1 else null end) as Jan2023,
count(case when p.CreationDate between '2023-1-1' and '2023-7-1' then 1 else null end) as Jul2023,
count(case when p.CreationDate between '2023-7-1' and '2024-1-1' then 1 else null end) as Jan2024
from Posts p
join PostTags pt on pt.PostId = p.Id
join Tags t on t.Id = pt.TagId
and t.TagName in ('javascript','typescript','python','java','ruby','php','go','css','c#','c++','shell','c','rust','kotlin','scala','swift','dart','powershell','objective-c','r')
group by t.TagName

Enter Parameters

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