Loading problem...
A customer data platform receives account records from multiple systems.
Table: customers
Task: Find all missing customer IDs in the integer range from 1 to the maximum customer_id currently present in the table.
Definition:
Output requirements:
Notes:
Supported submission environments:
customers:
| customer_id | customer_name |
|-------------|---------------|
| 1 | Alice |
| 4 | Bob |
| 5 | Charlie |[
{"ids":2},
{"ids":3}
]The maximum ID is 5, so inspect [1, 5]. IDs 2 and 3 do not appear in customers and are therefore missing.
customers:
| customer_id | customer_name |
|-------------|---------------|
| 2 | Nia |
| 3 | Omar |
| 5 | Pia |
| 9 | Quin |[
{"ids":1},
{"ids":4},
{"ids":6},
{"ids":7},
{"ids":8}
]The inspection range is [1, 9]. IDs present are {2,3,5,9}; the remaining IDs in range are missing.
customers:
| customer_id | customer_name |
|-------------|---------------|
| 1 | Ava |
| 2 | Ben |
| 3 | Cara |
| 4 | Dan |[]All IDs from 1 through max(customer_id)=4 are present, so there are no gaps.
Constraints