Q&A for scientists using computers to solve scientific problems
select u.Id, u.DisplayName, u.Location, count(b.ID) from Users u join Badges b on u.Id=b.UserID and u.Location like '%Latvia%' where exists ( select p.Id from Posts p where u.Id=p.OwnerUserId and p.CreationDate >= '2021-01-01 00:00:00' and p.CreationDate < '2022-01-01 00:00:00' ) group by u.ID, u.DisplayName,u.Location having count(b.ID) > 100 order by count(b.ID) desc