Q&A about the site for music historians, critics, and fans
-- Average number of views of questions by creation date -- only for unclosed and not community owned questions declare @startDate date = '##startDate##'; declare @endDate date = '##endDate##'; select cast( CreationDate as date), AvgViews = round(AVG( cast( ViewCount as float ) ),2) -- TotalQues = count(*) from Posts where PostTypeId = 1 and cast( CreationDate as date) between @startDate and @endDate and ClosedDate is null and CommunityOwnedDate is null group by cast ( CreationDate as date ) order by cast ( CreationDate as date )