Write a query using a self-join to find employees who earn more than their managers.
Use the employees table and compare each employee's salary with the salary of the employee referenced by manager_id. Exclude employees without a manager or without a comparable salary.
employee_id, employee_name, employee_salary, manager_name, manager_salaryemployee_id ascending| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee's full name |
| manager_id | INT | Employee ID of the person's manager |
| salary | DECIMAL(12,2) | Annual employee salary |