How can I see who has the most of a certain badge?

0

Please login or register to vote for this query.

(click on this box to dismiss)

https://meta.stackexchange.com/questions/302012/how-can-i-see-who-has-the-most-of-a-certain-badge

Stack Overflow на русском

Вопросы и ответы для программистов

-- badgename:badgename or * for all badges

select name
     , concat(
        'site://'
       , 'users/'
       , userid
       , '?tab=badges'
       , '|'
       , u.displayname)
       as [User]
     , count(*) as[# of badges] 
from badges b
inner join users u on u.id = b.userid
where (##badgename:string?*## = '*' or name = ##badgename:string?*##)
group by name, userid, u.displayname
order by count(*) desc

Enter Parameters

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