Q&A for professionals and students of engineering
sum(case when PostTypeId = 1 then 1 else 0 end) Questions,
sum(case when PostTypeId = 2 then 1 else 0 end) Answers
cast(DATEPART(YYYY, CreationDate) as varchar) + '-' + cast(DATEPART(MM, CreationDate) as varchar) + '-01'
as datetime) [Month],
from Posts p
where DeletionDate IS NULL and Score >= 0 and CreationDate < '01/01/2020' and CreationDate > '01/01/2000'
) as X
group by [Month]
order by [Month] asc