HR Analytics level task. **Condition:** For each manager, calculate the total salary of all their subordinates (direct and indirect). **Table:** org_employees (employee_id, name, manager_id, salary, ...) **Requirements:** 1. Recursively find all subordinates for each manager 2. Sum their salaries 3. Output manager_id, manager_name, direct_reports_count, total_reports_count, total_subordinate_salary **Hint:** Recursive CTE with counting and aggregation.
Sign in to solve
Start Solving