Q&A for SharePoint enthusiasts
SELECT PostTypeId, COUNT(*) as NrOfPosts FROM posts WHERE YEAR(CreationDate) = '2019' GROUP BY PostTypeId;