Q&A for professional and enthusiast programmers
select OwnerUserId,Title, Score,
order by Score desc
) as rank_id
from Posts p
PostTypeId = 1
and ClosedDate >= '2021-09-01 00:00:00'
and ClosedDate < '2021-10-01 00:00:00'
and exists (select 1 from Badges b where b.UserId = p.OwnerUserId )
) as t
where t.rank_id <= 50