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 = 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;