Ranking of Participation Badges with a Breakdown by Gold, Silver, Bronze

0

Please login or register to vote for this query.

(click on this box to dismiss)

Total badges for each user, as well as a breakdown of non-tag badges by badge type is created for each user.

Chess

Q&A for serious players and enthusiasts of chess

SELECT TOP(2000)
  UserId AS [User Link],
  COUNT(*) AS "Total Badges",
  SUM(CASE WHEN Name IN ('Great Question', 'Great Answer', 'Populist') THEN 1 ELSE 0 END) AS "Gold",
  SUM(CASE WHEN Name IN ('Good Question', 'Enlightened', 'Guru', 'Good Answer', 'Necromancer') THEN 1 ELSE 0 END) AS "Silver",
  SUM(CASE WHEN Name IN ('Nice Question', 'Nice Answer', 'Revival') THEN 1 ELSE 0 END) AS "Bronze"
FROM Badges
GROUP BY UserId
ORDER BY COUNT(*) DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results