Loading problem...
An HR analytics warehouse stores active employee rows and keeps each worker's manager ID as a reference. When supervisors leave, their rows are removed from the active table, but direct reports may still carry the old manager_id value.
Table: employees
Task: Return employee IDs for workers who satisfy both conditions:
Output requirements:
Supported submission environments:
employees:
| employee_id | name | manager_id | salary |
|-------------|-----------|------------|--------|
| 3 | Mila | 9 | 60301 |
| 12 | Antonella | null | 31000 |
| 13 | Emery | null | 67084 |
| 1 | Kalel | 11 | 21241 |
| 9 | Mikaela | null | 50937 |
| 11 | Joziah | 6 | 28485 |[
{"employee_id":11}
]Employees 1 and 11 are below 30000. Employee 1 reports to 11, which exists, so it does not qualify. Employee 11 reports to manager 6, which is missing, so it qualifies.
employees:
| employee_id | name | manager_id | salary |
|-------------|--------|------------|--------|
| 101 | Iris | null | 21000 |
| 102 | Noor | 101 | 29999 |
| 103 | Omar | 999 | 30000 |
| 104 | Pia | 999 | 29999 |[
{"employee_id":104}
]Employee 104 is below 30000 and references missing manager 999. Employee 103 fails because salary is exactly 30000, not strictly lower.
employees:
| employee_id | name | manager_id | salary |
|-------------|--------|------------|--------|
| 10 | Alex | null | 25000 |
| 20 | Bea | 10 | 22000 |
| 30 | Chen | 20 | 31000 |[]No row satisfies both conditions at the same time.
Constraints