Q&A about the site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure
-- Find all users from Latvia with more than 100 badges, -- depicting results staring from the user with the most badges. -- (Show number of badges in the list, as well). SELECT TOP 10 Users.Id, Users.DisplayName, COUNT(Badges.Id) AS NumberOfBadges FROM Users INNER JOIN Badges ON Badges.UserId = Users.Id WHERE Users.Location LIKE '%Latvia%' GROUP BY Users.Id, Users.DisplayName ORDER BY NumberOfBadges DESC