Q&A for users and developers of the Cardano cryptocurrency ecosystem
DECLARE @UserId int = ##UserId## SELECT Count(*) AS ClassCount, Class FROM Badges WHERE UserId = @UserId GROUP BY Class ORDER BY Class DESC