Employees Earning More Than Their Manager
Learn Employees Earning More Than Their Manager (Advanced SQL Interview Problems, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction A self join treats the same table as two roles: employee (e) and manager (m), linked by manager_id. Then compare their salaries.
More lessons in Advanced SQL Interview Problems
- Second & Nth Highest Salary Problems
- Find & Remove Duplicate Records
- Department-wise Highest Salary & Top 3 per Department
- Running Total & Moving Average Problems
- Consecutive Dates, Missing Numbers & Gaps and Islands
- Employee Hierarchy & Recursive Organizational Tree
- Customers Who Never Ordered
- Most Frequently Purchased Product & Monthly Revenue
- Year-over-Year Growth & Retention Analysis