Order users by Badges

0

Please login or register to vote for this query.

(click on this box to dismiss)

Will count the amount of badges a user has (Gold, Silver, Bronze) and rank them by it.

Ask Ubuntu

Q&A for Ubuntu users and developers

SELECT DisplayName AS Name,COUNT(badges.id) AS Badges FROM users,badges 
 WHERE users.id = badges.UserId 
  GROUP BY DisplayName 
   HAVING count(badges.id) > 100 
    ORDER BY Badges DESC

Enter Parameters

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