SQL Fundamentals — Hard
Key points
- The query uses the PARTITION BY clause to group employees by department
- The ROW_NUMBER() function assigns a unique ranking to each employee based on salary
- The QUALIFY clause filters the results to only include employees with a ranking of 1
Ready to go further?
Related questions
