Health Catalyst uses employee reporting data to support organizational views in its Data Operating System. An engineering lead needs a list of everyone who reports directly to one manager.
Write a PostgreSQL query that returns all direct reports for the manager whose employee_id is supplied as parameter \$1. Do not include the manager in the result.
employees to match each employee to the requested manager.LEFT JOIN for department names so an employee with no department still appears.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| job_title | VARCHAR(100) | Employee job title |
| manager_id | INT | Direct manager employee ID |
| department_id | INT | Employee department identifier |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |