Number of Posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Mathematics

Q&A for people studying math at any level and professionals in related fields

SELECT 
    YEAR(CreationDate) AS year,
    MONTH(CreationDate) AS month,
    COUNT(Id) AS total_posts,
    COUNT(CASE WHEN ViewCount IS NULL THEN 1 END) AS zero_view_posts,
    COUNT(CASE WHEN ViewCount IS NOT NULL THEN 1 END) AS non_zero_view_posts
FROM 
    Posts
GROUP BY 
    YEAR(CreationDate),
    MONTH(CreationDate)
ORDER BY 
    year, month;

Enter Parameters

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