Q&A for people studying math at any level and professionals in related fields
SELECT YEAR(CreationDate) AS year1, MONTH(CreationDate) AS month1, Location, COUNT(Id) AS user_count FROM Users WHERE YEAR(CreationDate) = 2022 AND MONTH(CreationDate) BETWEEN 10 AND 12 GROUP BY YEAR(CreationDate), MONTH(CreationDate), Location ORDER BY YEAR(CreationDate) DESC, MONTH(CreationDate), Location DESC