No Manager
manager_id holds the id of a person's manager, and is empty (NULL) for people who have none. Return the name of everyone without a manager. Rows may come in any order.
Example 1
employees
| id | name | manager_id |
|---|---|---|
| 1 | Ada | NULL |
| 2 | Ben | 1 |
| 3 | Cy | 1 |
| 4 | Dee | NULL |
returns
| name |
|---|
| Ada |
| Dee |
Constraints
- Up to 12 people
Write it in your browser, against the clock. The model query, with a note on each piece of it, comes after.
More SQL problems
- One SymbolBeginner
- One of SeveralBeginner
- Only the Big OnesBeginner
- Starts With ABeginner
- Three LargestBeginner
- Trade ValueBeginner
- Two ColumnsBeginner
- Average per SymbolEasy