Q&A about the site for people interested in the history and origins of science and mathematics
WITH b AS (SELECT UserId, Name FROM Badges WHERE Name IN ('Civic Duty', 'Cleanup', 'Deputy', 'Electorate', 'Marshal', 'Reviewer', 'Sportsmanship', 'Steward') GROUP BY UserId, Name) SELECT UserId AS [User Link], COUNT(*) AS 'Number of moderation badges' FROM b GROUP BY UserId ORDER BY COUNT(*) DESC