select * from ( select top 25 userid from badges where na...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Literature Meta

Q&A about the site for scholars and enthusiasts of literature

select *
from 
(
select top 25 userid
from badges
where name = 'Unsung Hero'
order by date desc, id desc
) B
cross apply
(
select top 20 a.*
from posts a
inner join posts q on q.id = a.parentid and q.acceptedanswerid=a.id
where a.posttypeid = 2
  and a.score = 0 -- inexact, Unsung Hero uses Vote=0(?)
  and a.owneruserid = B.userid
) A

Enter Parameters

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