Highest reputation users with a specific badge


Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

SELECT TOP(##num?500##)
  RANK() OVER(ORDER BY u.Reputation DESC) AS Rank,
  u.Id AS [User Link],
  COUNT (b.Id) AS [Count]
FROM Badges b INNER JOIN Users u ON b.UserId=u.Id
  WHERE (b.Name = '##name?Famous Question##')
GROUP BY u.Id, u.Reputation
ORDER BY u.Reputation DESC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results