Q&A for scientists using computers to solve scientific problems
SELECT eomonth(p.CreationDate) [month], COUNT(p.Id) AS [Count] FROM PostsWithDeleted p WHERE (p.CreationDate >= '##Date1?2021-01-01##') AND (p.CreationDate <= '##Date2?2023-01-01##') AND (p.PostTypeId IN (##types?1,2##)) ---types=1: only questions ---types=2: only answers ---types=1,2: both questions and answers GROUP BY eomonth(p.CreationDate) ORDER BY eomonth(p.CreationDate)