Q&A for professional and enthusiast programmers
select b.UserId, count(b.Id) as badge_count from Badges b, (select p.OwnerUserId as uid from Posts p, PostTags pt, Users u where p.OwnerUserId=u.Id and p.Id=pt.PostId and (pt.TagId=2751) and p.PostTypeid=1 and p.CreationDate>=cast('2015-03-01' as datetime) and p.CreationDate<=cast('2017-03-31' as datetime) group by p.OwnerUserId ) UserList where UserList.uid=b.UserId group by b.UserId