Return dept_id, first_name, salary and gap_to_top — how much less they earn than the highest paid in their department (employees with a department).
19 rows with columns dept_id, first_name, salary, gap_to_top — first 3 shown:
| # | ||||
|---|---|---|---|---|
| 1 | 1 | Anita | 250000 | 0 |
| 2 | 1 | Rahul | 180000 | 70000 |
| 3 | 1 | Priya | 140000 | 110000 |
Run your code to see the output here.