Loading problem...
A workforce analytics platform stores core employee records and a separate mapping table that assigns an optional enterprise-wide unique identifier.
Table: employees
Table: employee_uni
Task: Return a directory view that includes every employee from employees and shows their mapped unique_id when present.
For employees without a mapping row in employee_uni, return unique_id as null.
Output requirements:
Supported submission environments:
employees:
| id | name |
|----|----------|
| 1 | Alice |
| 7 | Bob |
| 11 | Meir |
| 90 | Winston |
| 3 | Jonathan |
employee_uni:
| id | unique_id |
|----|-----------|
| 3 | 1 |
| 11 | 2 |
| 90 | 3 |[
{"unique_id":null,"name":"Alice"},
{"unique_id":null,"name":"Bob"},
{"unique_id":2,"name":"Meir"},
{"unique_id":3,"name":"Winston"},
{"unique_id":1,"name":"Jonathan"}
]Only three employees are mapped in employee_uni. Others remain in the output with unique_id = null.
employees:
| id | name |
|----|--------|
| 10 | Nora |
| 11 | Luis |
| 12 | Priya |
employee_uni:
| id | unique_id |
|----|-----------|
| 10 | 9010 |
| 11 | 9011 |
| 12 | 9012 |[
{"unique_id":9010,"name":"Nora"},
{"unique_id":9011,"name":"Luis"},
{"unique_id":9012,"name":"Priya"}
]Every employee has a unique identifier mapping, so no null values appear.
employees:
| id | name |
|----|-------|
| 40 | Omar |
| 41 | Omar |
| 42 | Lina |
employee_uni:
| id | unique_id |
|----|-----------|
| 41 | 7001 |[
{"unique_id":null,"name":"Omar"},
{"unique_id":7001,"name":"Omar"},
{"unique_id":null,"name":"Lina"}
]Mapping is done by id, not by name. Two employees can share the same name but have different mapping outcomes.
Constraints