Mysql
 sql >> Database >  >> RDS >> Mysql

Classifica posizioni congiunte in MySQL

E questo?

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