本文主要是介绍[leetcode][DataBase] - 178. Rank Scores with [MySQL],希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
problem
select inn.Score,inn.Rank from (select ss.Score,@row:=@row+1 as Rankfrom (select @row:=0) a,(select Score from Scores group by Score) as ssorder by ss.Score desc
) as inn
right join
Scores as sss
on inn.Score = sss.Score
order by inn.Score desc
;
这篇关于[leetcode][DataBase] - 178. Rank Scores with [MySQL]的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!