Post count, view count, view/post ratio per day


Please login or register to vote for this query.

(click on this box to dismiss)

Latin Language

Q&A for linguists, teachers, and students wanting to discuss the finer points of the Latin language

DECLARE @TagName nvarchar (25) = '##TagName##'

   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

Enter Parameters

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