Users By Number Of Gold Non-Tag Badges

1

Please login or register to vote for this query.

(click on this box to dismiss)

DevOps Meta

Q&A about the site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure

with GoldBadgeCounts as (
  select
    u.Id as UserId,
    (
      select count(*) from Badges b
      where b.UserId = u.Id
      and b.Name in (
        'Copy Editor',
        'Electorate',
        'Famous Question',
        'Fanatic',
        'Great Answer',
        'Great Question',
        'Legendary',
        'Marshal',
        'Populist',
        'Publicist',
        'Reversal',
        'Stellar Question',
        'Unsung Hero'
      )
    ) as GoldCount
  from Users u
)

select top 1000
  Rank() over (order by GoldCount desc),
  UserId as [User Link],
  GoldCount as [Gold Badges]
from GoldBadgeCounts
order by GoldCount desc

Enter Parameters

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