Most decorated users
Q&A for people looking to bypass life's everyday problems with simple tricks
SELECT TOP 300
row_number() over(order by count(*) desc) as rank,
Badges.UserId AS [User Link],
count(*) AS 'Badge Count',
Users.Reputation AS 'Total user reputation',
Users.Reputation / (10 * count(*)) AS 'Reputation / (10 * Bages)'
Users.id = Badges.UserId AND
Badges.Name = 'Necromancer' AND
Badges.Date < '##Date?9999-01-01##'
Users.id = Posts.OwnerUserId
'Badge Count' DESC,