Q&A about the site for serious players and enthusiasts of chess
SELECT b.UserId, COUNT(b.UserId) AS BadgesCount, u.DisplayName FROM Badges b JOIN Users u ON b.UserId = u.Id GROUP BY u.DisplayName, b.UserId ORDER BY BadgesCount DESC