Tags with the most gold, silver, bronze tags badges


Please login or register to vote for this query.

(click on this box to dismiss)

Motor Vehicle Maintenance and Repair Meta

Q&A about the site for mechanics and DIY enthusiast owners of cars, trucks, and motorcycles

SELECT TOP(##num?200##)
  sum(case when b.class = 1 then 1 else 0 end) AS gold,
  sum(case when b.class = 2 then 1 else 0 end) AS silver,
  sum(case when b.class = 3 then 1 else 0 end) AS bronze,
  count(b.Id) AS total
FROM Badges b INNER JOIN tags t ON t.tagname=b.name
GROUP BY t.tagname
ORDER BY gold DESC, silver DESC, bronze DESC, total DESC

Enter Parameters

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