Users with gold badges, sorted by gold badges in descending order

1

Please login or register to vote for this query.

(click on this box to dismiss)

Programming Language Design and Implementation

Q&A for designers and implementers of computer programming languages

SELECT u.Id AS [User Link],
  MAX(b.Name) AS 'One of the gold badges they have',
  COUNT(*) AS 'Number of gold badges'
FROM Users AS u
INNER JOIN Badges AS b
  ON b.UserId = u.Id
WHERE b.Class = 1
GROUP BY u.Id
ORDER BY COUNT(*) DESC;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results