Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Ranking gemeinsamer Positionen in MySQL

Was ist damit?

SELECT userid, score, 
(SELECT COUNT(distinct u2.score) FROM fschema.mytab3 u2 
WHERE 
u2.score > u1.score) + 1 AS position FROM fschema.mytab3 u1
ORDER BY position