Q&A for professional and enthusiast programmers
-- Enter Query Title -- Enter Query Description SELECT TOP 100 Id AS [User Link], B.C AS Count FROM Users U INNER JOIN (SELECT UserId, C = Count(*) FROM Badges GROUP BY UserId) B ON U.id = B.UserId