Q&A for apps, scripts, and development with the Stack Exchange API
-- Gold tag badges by number of times awarded
SELECT TOP 200 Name AS "Badge name", Count(UserId) as "Number of times awarded"
FROM Badges b
WHERE b.TagBased=1 and b.class=1
GROUP BY Name
ORDER BY "Number of times awarded" DESC