Table: Project

    1. +-------------+---------+
    2. | Column Name | Type |
    3. +-------------+---------+
    4. | project_id | int |
    5. | employee_id | int |
    6. +-------------+---------+
    7. 主键为 (project_id, employee_id)。
    8. employee_id 是员工表 Employee 表的外键。

    Table: Employee

    1. +------------------+---------+
    2. | Column Name | Type |
    3. +------------------+---------+
    4. | employee_id | int |
    5. | name | varchar |
    6. | experience_years | int |
    7. +------------------+---------+
    8. 主键是 employee_id

    编写一个SQL查询,报告所有雇员最多的项目。
    查询结果格式如下所示:

    1. Project table:
    2. +-------------+-------------+
    3. | project_id | employee_id |
    4. +-------------+-------------+
    5. | 1 | 1 |
    6. | 1 | 2 |
    7. | 1 | 3 |
    8. | 2 | 1 |
    9. | 2 | 4 |
    10. +-------------+-------------+
    11. Employee table:
    12. +-------------+--------+------------------+
    13. | employee_id | name | experience_years |
    14. +-------------+--------+------------------+
    15. | 1 | Khaled | 3 |
    16. | 2 | Ali | 2 |
    17. | 3 | John | 1 |
    18. | 4 | Doe | 2 |
    19. +-------------+--------+------------------+
    20. Result table:
    21. +-------------+
    22. | project_id |
    23. +-------------+
    24. | 1 |
    25. +-------------+
    26. 第一个项目有3名员工,第二个项目有2名员工。