Q&A for linguists, teachers, and students wanting to discuss the finer points of the Latin language
DECLARE @TagName nvarchar (25) = '##TagName##' SELECT TOP 112 CAST(p.CreationDate AS date) AS pdate, COUNT(*) AS nposts_per_day, SUM(p.ViewCount) AS nviews_per_day, SUM(p.ViewCount)/COUNT(*) AS view_post_ratio FROM Tags JOIN PostTags AS pt ON Tags.Id = pt.TagId JOIN Posts AS p ON pt.PostId = p.Id WHERE Tags.TagName = @TagName GROUP BY CAST(p.CreationDate AS date) ORDER BY pdate DESC