Q&A for Ubuntu users and developers
DECLARE @YearNum int = 2022 select year(creationdate) , PostTypeId , count(PostTypeId) type_count from posts where year(creationdate) = @YearNum group by year(creationdate) , PostTypeId order by count(PostTypeId)