Q&A about the site for researchers, developers, and users of Tor
SELECT CAST(Posts.CreationDate AS DATE) AS Day, -- Use DATE to get the date part only Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName = 'unity-game-engine' AND -- Replace 'your_tag_here' with the tag you're interested in PostTypes.Name = 'Question' AND Posts.CreationDate >= DATEADD(month, -5, GETDATE()) AND -- Last 5 months Posts.CreationDate < DATEADD(DAY, 0, GETDATE()) -- Exclude today GROUP BY CAST(Posts.CreationDate AS DATE), Tags.TagName ORDER BY CAST(Posts.CreationDate AS DATE), Tags.TagName;