Q&A about the site for scholars and enthusiasts of literature
SELECT HighestViewCount = MAX(p.ViewCount) INTO #vc FROM posts p WHERE 1=1 AND p.CreationDate BETWEEN '2020-10-01' AND '2020-12-31 23:59:59:997' SELECT * FROM #vc vc JOIN Posts p on p.ViewCount = vc.HighestViewCount JOIN Users u on u.id = p.OwnerUserid WHERE 1=1 AND p.CreationDate BETWEEN '2020-10-01' AND '2020-12-31 23:59:59:997'