SQL RANK
SQL
https://www.codewars.com/kata/58094559c47d323ebd000035/train/sql
SELECT p.id, p.name, COUNT(s.sale) sale_count, RANK () OVER ( ORDER BY COUNT(s.sale) DESC ) sale_rank FROM people p JOIN sales s ON p.id=s.people_id GROUP BY p.id, p.name
6
5
4
4
4