sql #2

a guest Sep 13th, 2011 215 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. with scores as
  2.         (select
  3.                 row_number() over (order by score desc) as rn,
  4.                 name,
  5.                 score
  6.         from
  7.                 players)
  8. select
  9.         name,
  10.         score
  11. from
  12.         scores
  13. where
  14.         score in (select score from scores where rn = 3)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand