Question: Design a query using a correlated subquery that lists the highest earners for each department. Include the last_name, department_id, and the salary for each employee.
| LAST_NAME | SALARY | DEPARTMENT_ID |
|---|---|---|
| Hartstein | 13000 | 20 |
| Mourgos | 5800 | 50 |
| Hunold | 9000 | 60 |
| Abel | 11000 | 80 |
| Zlotkey | 10500 | 80 |
| King | 24000 | 90 |
| Higgins | 12000 | 110 |
Step by Step Solution
3.40 Rating (162 Votes )
There are 3 Steps involved in it
To achieve this you can use a correlated subquery to find the highest salary for each department and ... View full answer
Get step-by-step solutions from verified subject matter experts
