Employees
table on manager_id
to find employees who indirectly report to the head.employee_id
from the final recursive CTE to get the list of all employees who report directly or indirectly to the head of the company.erDiagram Employees { int employee_id varchar employee_name int manager_id }