Company: protium finance
Difficulty: hard
Employee Promotion Opportunity You are given one table named `employees`. | Column | Type | Description | |---|---|---| | `id` | INTEGER | Unique employee identifier | | `name` | TEXT | Employee name | | `salary` | INTEGER | Employee salary | | `manager_id` | INTEGER or NULL | The `id` of the employee's manager, or `NULL` when the employee has no manager | Write a MySQL 8.0 query that returns every employee with these columns, in this order: 1. `EmployeeName` — the employee's name. 2. `Salary` — the employee's salary. 3. `ManagerName` — the manager's name, or `No Manager` when `manager_id` is `NULL`. 4. `PromotionOpportunity` — `Yes` when the employee has a manager and earns strictly more than that manager; otherwise `No`. Order the result by the difference `employee salary − manager salary` in descending order. Employees with no manager are placed after employees with a manager; break any remaining ties by `id` ascending. Notes - This is a self-join of `e