Return each employee's name, salary, and their rank by salary (highest first). Two employees share the highest tied salary in the middle of the pack — use DENSE_RANK so tied employees get the same rank and the next rank has no gap afterward.
Expected output
name
salary
salary_rank
Ana Reyes
150000
1
Dan Ellis
140000
2
Finn Gray
130000
3
First 3 of 10 rows your query should return. Your column aliases don't need to match.