Your question is Self-Join Manager Salary Check. Start with the requirements and the one table 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.
Tiger Analytics is reviewing workforce compensation data to identify reporting relationships that may require management attention. Write a PostgreSQL query using a self-join on the employees table to find employees who earn more than their direct managers.
manager_id.| Column | Type | Description |
|---|---|---|
| employee_idPK | INTEGER | Unique identifier for the employee |
| employee_name | VARCHAR(100) | Employee's full name |
| salary | NUMERIC(10,2) | Employee's annual salary |
| manager_id | INTEGER | Employee ID of the direct manager |