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