Get count of post and the average ViewCount per day

1

Please login or register to vote for this query.

(click on this box to dismiss)

Writing

Q&A for the craft of professional writing, including fiction, non-fiction, technical, scholarly, and commercial writing

SELECT 
    CAST(CreationDate AS DATE) as Date, 
    COUNT(Id) as TotalPosts, 
    AVG(ViewCount) as AverageViewCount
FROM 
    Posts
WHERE 
    PostTypeId = 1
GROUP BY 
    CAST(CreationDate AS DATE)
ORDER BY 
    Date;

Enter Parameters

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