SQL-聚合函数-1075.项目员工I

解题思路:

 

SELECT 
    Project.project_id AS project_id,
    ROUND(SUM(Employee.experience_years)/COUNT(Project.project_id), 2) AS average_years
FROM Project
LEFT JOIN Employee
ON Project.employee_id = Employee.employee_id
GROUP BY Project.project_id;

 

posted @ 2023-11-30 06:14  我是球啊  阅读(5)  评论(0编辑  收藏  举报