Q&A for pro webmasters
SELECT COUNT(UserId), UserId FROM Badges GROUP BY UserId ORDER BY COUNT(UserId) desc