Q&A for professional and enthusiast programmers
SELECT b.Name, b.Class, count(*) as Count FROM Badges b WHERE b.TagBased = 1 GROUP BY Class, Name ORDER BY Class DESC, Name