178. Rank Scores

SELECT
  Score,
  (SELECT count(distinct Score) FROM Scores WHERE Score >= s.Score) Rank
FROM Scores s
ORDER BY Score desc

  

posted @ 2017-10-25 03:13  Weiyu Wang  阅读(95)  评论(0编辑  收藏  举报