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)

Constructed Languages

Q&A for designers and users of artificial or invented languages, consciously developed instead of having developed naturally

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