List top 10 gold badge medalists in Code Review

87 Views Asked by At

What I want to achieve in particular is getting top 10 gold badge medalists in Code Review.

(A Data Explorer solution is acceptable, too.)

Is there a way to do it?

1

There are 1 best solutions below

0
On

Using the Stack Exchange Data Explorer (SEDE) what you're asking is much easier.

From the Badges table, filter only the badges awareded that are gold, group by users and sort by the count.

SELECT
  TOP 100 UserId AS [User Link],
  COUNT(*)

FROM Badges
WHERE class = 1

GROUP BY UserId
ORDER BY COUNT(*) DESC

You can see the query live here.


Reference: Database schema documentation for the public data dump and SEDE