Users ranked by number of badges (all kinds)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

-- Users ranked by number of badges (all kinds)

SELECT TOP 100
  *
FROM (
  SELECT
    Users.Id as [User Link],
    COUNT(*) as [NumBadges]
  FROM
    Users INNER JOIN Badges
    ON Users.Id = Badges.UserId
  GROUP BY
    Users.Id
) as UsersWithBadgeCount
ORDER BY
  NumBadges DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results
:records returned in :time ms:cached