select * from( select Id, OwnerUserId, Score, Title, dens...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select *
from(
select Id, OwnerUserId, Score, Title,
dense_rank() over(
 order by Score desc
) as rank_id
from Posts p
where
 PostTypeId = 1 
and year(ClosedDate)= 2021
and month(ClosedDate)= 9
 and exists (select 1 from Badges b where b.UserId = p.OwnerUserId )
 ) as t 
 where t.rank_id <= 50

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results