Window Functions: RANK()
Window functions perform calculations across a set of table rows that are somehow related to the current row.
Unlike GROUP BY, window functions do not collapse rows into a single output row.
SELECT name, score, RANK() OVER (ORDER BY score DESC) as rank
FROM players;
Task:
Rank the employees by their salary in descending order.