Employees Earning More Than Their Managers
Easy
Joins
Find the names of employees who earn more than their direct manager.
Table schema
Employees(id INT PRIMARY KEY, name VARCHAR(50), salary INT, manager_id INT NULL)Sample data
id | name | salary | manager_id
1 | Joe | 70000 | 3
2 | Henry | 80000 | 4
3 | Sam | 60000 | NULL
4 | Max | 90000 | NULL
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.