Q&A for practitioners, researchers, and students in cognitive science, psychology, neuroscience, and psychiatry
--select count (Badges.UserId), Users.Id, Users.DisplayName, Users.Location --from Badges, Users --where Badges.UserId=Users.Id --and Users.Location='Latvia' --group by count (Badges.UserId) --having count (Badges.UserId)>100 SELECT Users.Id, Users.DisplayName, Users.Location, Badges.UserId, COUNT(*) FROM Users, Badges WHERE Users.Id=Badges.UserId AND Users.Location='Latvia' GROUP BY Users.Id, Users.DisplayName, Users.Location, Badges.UserId HAVING COUNT(*)>100