Self Join: Employees Earning More Than Their Manager
Hard
joins
Google
Meta
Amazon
Use a self join on employees to find all employees whose salary is strictly greater than their direct manager's salary.
Expected Output
| emp_name | emp_salary | manager_name | manager_salary |
|---|---|---|---|
| Dave | 95000.0 | Bob | 80000.0 |
Tables
Hints (3 available)
SQL Editor
Output
Click "Run" to see results...