Q&A about the site for enthusiasts and scholars of mythology and folklore
SELECT OwnerUserId, DATEPART(WEEK, CreationDate) AS WeekNumber, COUNT(Id) AS PostsCount, SUM(CASE WHEN PostTypeId = 1 THEN 1 ELSE 0 END) AS QuestionsCount, SUM(CASE WHEN PostTypeId = 2 THEN 1 ELSE 0 END) AS AnswersCount FROM Posts WHERE OwnerUserId IN ( SELECT Id FROM Users WHERE CreationDate BETWEEN '2008-01-01' AND '2024-10-01' ) GROUP BY OwnerUserId, DATEPART(WEEK, CreationDate) ORDER BY WeekNumber;