Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select P.playerid AS playerid,sum(P.one) AS rank,P.score AS score from
- (SELECT playerid,sum(score) AS score,1 AS one FROM tbl) P
- INNER JOIN (SELECT playerid,sum(score) AS score,1 AS one FROM tbl) Q
- ON P.score>Q.score
- GROUP BY P.playerid
- ORDER BY rank
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement