Exercise: Employee Managers
Find employees and their managers.
Solution
sql
1SELECT
2 e.name AS employee,
3 m.name AS manager
4FROM employees e
5LEFT JOIN employees m ON e.manager_id = m.id;
Find employees and their managers.
1SELECT
2 e.name AS employee,
3 m.name AS manager
4FROM employees e
5LEFT JOIN employees m ON e.manager_id = m.id;