Participants List

1

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

DECLARE @PostId int = ##PostId##

select * from users
where id in 
( 
    select userid 
    from (
            select
              q.id,
              q.owneruserid as userid
            from
              posts q
            
            union all
            select
              q.id,
              a.owneruserid as userid
            from
              posts q left join posts a on (q.id = a.parentid)

            union all
            select
              q.id,
              qc.userid as userid
            from
              posts q left join posts a on (q.id = a.parentid)
                      left join comments qc on (q.id = qc.postid)

            union all
            select
              q.id,
              ac.userid as userid
            from
              posts q left join posts a on (q.id = a.parentid)
                      left join comments ac on (a.id = ac.postid)       
        ) A
    where A.userid is not null
    and A.id = @PostId
);

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results