Classic recursive CTE task. **Condition:** For each employee, build the full path in the organizational hierarchy from them to the CEO. **Table:** org_employees (employee_id, name, manager_id, department, salary, level) **Requirements:** 1. Use recursive CTE 2. Path in format: "CEO -> Director -> Manager -> Employee" 3. Output employee_id, name, path, depth (level from CEO) **Hint:** Anchor member — CEO (manager_id IS NULL), recursive member — JOIN by manager_id.
Sign in to solve
Start Solving