Q&A for professional and enthusiast programmers
select sum(case when creationDate between '2022-01-01' and '2022-08-29' then 1 else 0 end) as cnt_2022, sum(case when creationDate between '2023-01-01' and '2023-08-29' then 1 else 0 end) as cnt_2023 from posts