Q&A for those interested in the geology, meteorology, oceanography, and environmental sciences
SELECT u.Id AS UserID, CONVERT(DATE, u.CreationDate) AS UserCreationDate, MIN(CONVERT(DATE, p.CreationDate)) AS JanuaryFirstPostDate, MAX(CONVERT(DATE, p.CreationDate)) AS JanuaryLastPostDate, COUNT(*) AS JanuaryPostCount FROM Users u JOIN Posts p ON u.Id = p.OwnerUserId WHERE CONVERT(DATE, u.CreationDate) = '2021-12-23' AND p.CreationDate BETWEEN '2022-01-01' AND '2022-01-31' GROUP BY u.Id, CONVERT(DATE, u.CreationDate) ORDER BY JanuaryPostCount DESC;