Number of Posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Computational Science

Q&A for scientists using computers to solve scientific problems

SELECT 
    YEAR(CreationDate) AS year,
    MONTH(CreationDate) AS month,
    COUNT(Id) AS total_posts,
    COUNT(CASE WHEN ViewCount = 0 THEN 1 END) AS zero_view_posts,
    COUNT(CASE WHEN ViewCount > 0 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