Q&A for linguists, teachers and students of the Korean language
-- Example to batch the query by months WITH MinCreationDate AS ( SELECT MIN(CreationDate) AS MinDate FROM Posts ) SELECT YEAR(CreationDate) AS Year, -- Extract year from CreationDate SUM(CASE WHEN PostTypeId = 1 THEN 1 ELSE 0 END) AS TotalQuestionsCount, SUM(CASE WHEN PostTypeId = 2 THEN 1 ELSE 0 END) AS TotalAnswersCount FROM Posts WHERE OwnerUserId IN ( SELECT Id FROM Users WHERE CreationDate BETWEEN '2008-01-01' AND '2008-12-31' ) AND CreationDate <= (SELECT DATEADD(DAY, 30, MinDate) FROM MinCreationDate) AND YEAR(CreationDate) = 2008 -- Change this for each batch (2023, 2022, etc.) GROUP BY YEAR(CreationDate) -- Group by year ORDER BY Year; -- Order by year