SQL Data Analyst — Hard
Key points
- The function ROW_NUMBER() assigns a unique sequential number to each row
- PARTITION BY separates the ranking into groups based on dept_id
- ORDER BY salary DESC arranges the rows in descending order of salary
Ready to go further?
Related questions
