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)

Programming Language Design and Implementation

Q&A for designers and implementers of computer programming languages

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