Q&A for professional and enthusiast programmers
SELECT TOP 50 p.Id AS [Post Link], COUNT(c.Id) AS NumComments FROM Posts p JOIN Comments c ON p.Id = c.PostId GROUP BY p.Id ORDER BY -COUNT(c.Id)