Loading problem...
You are given two tables from a project staffing system.
Project table:
Employee table:
Task:
Output requirements:
Supported submission environments:
Project:
| project_id | employee_id |
|------------|-------------|
| 1 | 1 |
| 1 | 2 |
| 1 | 3 |
| 2 | 1 |
| 2 | 4 |
Employee:
| employee_id | name | experience_years |
|-------------|--------|------------------|
| 1 | Khaled | 3 |
| 2 | Ali | 2 |
| 3 | John | 1 |
| 4 | Doe | 2 |[
{"project_id":1}
]Project 1 has three assigned employees, while Project 2 has two.
Project:
| project_id | employee_id |
|------------|-------------|
| 10 | 101 |
| 10 | 102 |
| 20 | 101 |
| 20 | 103 |
| 30 | 102 |
Employee:
| employee_id | name | experience_years |
|-------------|-------|------------------|
| 101 | Nia | 5 |
| 102 | Omar | 6 |
| 103 | Leah | 4 |[
{"project_id":10},
{"project_id":20}
]Projects 10 and 20 both have team size 2, which is the maximum.
Project:
| project_id | employee_id |
|------------|-------------|
| 7 | 1 |
| 7 | 2 |
| 8 | 1 |
| 8 | 3 |
| 9 | 2 |
| 9 | 3 |
Employee:
| employee_id | name | experience_years |
|-------------|-------|------------------|
| 1 | Asha | 8 |
| 2 | Ben | 2 |
| 3 | Cara | 7 |[
{"project_id":7},
{"project_id":8},
{"project_id":9}
]All three projects tie with the same team size, so all are returned.
Constraints