Q&A for students, teachers, and linguists wanting to discuss the finer points of the Russian language
select top (1) with ties * from ( select x.DisplayName, x.Name as UserName, count(*) as NumBadges from ( select distinct u.DisplayName, b.Name from Badges b inner join Users u on u.Id = b.UserId ) x group by x.DisplayName, x.Name ) y order by y.NumBadges desc