all time count of questions of a specific tag per day, with rollup
Q&A for professional and enthusiast programmers
-- Questions per day for a specific tag -- All time count of questions of a specific tag per day, with rollup. -- Grand total is displayed at the bottom DECLARE @tagName varchar(255) = ##TagName:string## select year(p.CreationDate) as [Year], month(p.CreationDate) as [Month], day(p.CreationDate) as [Day], count(*) as [QuestionsAskedToday] from Posts p inner join PostTags pt on p.id = pt.postid inner join Tags t on t.id = pt.tagid where t.tagname = @tagName --and p.CreationDate > '2011-01-01 00:00:00' group by year(p.CreationDate), month(p.CreationDate),day(p.CreationDate) with rollup order by year(p.CreationDate) desc, month(p.CreationDate) desc,day(p.CreationDate) desc