select top 50 * from Posts p inner join Badges b on b.Us...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Meta Server Fault

Q&A about the site for system and network administrators

--Show the top 50 ranked questions (post type) of users with badges only,
-- which were closed in September 2021.
select  top 50 *
from Posts p
inner join Badges b 
on b.UserId = p.OwnerUserId
where year(ClosedDate)= 2021
and month(ClosedDate)= 9 and PostTypeId = 1 
-- and
--p.OwnerUserId in (select distinct b.UserId from Badges b )
--  exists (select 1 from Badges b where b.UserId = p.OwnerUserId)
order by Score desc

Enter Parameters

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