Chewy’s people analytics team wants to identify compensation anomalies for review. An employee qualifies when their salary is strictly greater than the salary of their directly assigned manager.
Write a PostgreSQL query using a self-join on employees to return every employee whose salary exceeds their manager’s salary.
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee’s full name |
| salary | NUMERIC(10,2) | Annual employee salary |
| manager_id | INT | References employees.employee_id for the direct manager |
| department | VARCHAR(50) | Organizational department |