SELECT DISTINCT (SELECT TOP 1 PERCENT Badges.UserID) AS U...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT DISTINCT (SELECT TOP 1 PERCENT Badges.UserID) AS User_Id, 
COUNT(Badges.Id) AS Badges,
Users.Reputation 
FROM Badges JOIN Users ON Badges.UserId = Users.Id
GROUP BY Badges.UserId, Users.Reputation
ORDER BY Users.Reputation DESC;

Enter Parameters

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