Your question is Employees Reporting to One Manager. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
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 |