Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. select P.playerid AS playerid,sum(P.one) AS rank,P.score AS score from
  2. (SELECT playerid,sum(score) AS score,1 AS one FROM tbl) P
  3. INNER JOIN (SELECT playerid,sum(score) AS score,1 AS one FROM tbl) Q
  4. ON P.score>Q.score
  5. GROUP BY P.playerid
  6. ORDER BY rank
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement