对分数排序  参考了网上的答案  而且如果不Order by 有一个BUG就是 如果表为空则什么都不输出包括null才是正确的。

   

# Write your MySQL query statement below
select s.Score, count(rank.Score) as Rank
from Scores s,(
     select distinct Score from Scores
) rank
where s.Score <= rank.Score
group by s.Id
order by s.Score desc;

 

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2022-02-26
  • 2022-01-17
猜你喜欢
  • 2022-02-25
  • 2021-11-29
  • 2021-08-07
  • 2022-01-12
  • 2022-12-23
  • 2021-08-10
  • 2021-12-09
相关资源
相似解决方案