select u.rank , u.Id as [User Link] , u.Reputation , p.Body

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 
       u.rank
     , u.Id as [User Link]
     , u.Reputation
     , p.Body
    from (
      select top 100 *
        , row_number() over (
            order by u.Reputation desc
          ) as rank
      from Users u
      order by u.Reputation desc
      ) as u
    cross apply (
      select top 3
        p.body
      from Posts p
      where p.OwnerUserId = u.Id
      ) p
    order by u.Reputation desc

Enter Parameters

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