Compare Gold, Silver and Bronze Badges

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 Top 10 UserId As [User Link], Count(*) As Gold
From (Select UserId From Badges
Where Name In (Select TagName from Tags)
Group By UserId, Name
Having Count(*)=3) d
Group By UserId
Order By Gold Desc;
*/
Select Top 10 UserId As [User Link], Count(*) As Silver
From (Select UserId From Badges
Where Name In (Select TagName from Tags)
Group By UserId, Name
Having Count(*)=2) d
Group By UserId
Order By Silver Desc;
/*
Select Top 10 UserId As [User Link], Count(*) As Bronze
From (Select UserId From Badges
Where Name In (Select TagName from Tags)
Group By UserId, Name
Having Count(*)=1) d
Group By UserId
Order By Bronze Desc
*/

Enter Parameters

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