sql17(Leetcode1075项目员工1)

# Write your MySQL query statement below
select project_id,round(sum(experience_years)/count(project_id),2) as average_years
from 
    Project as p
left join 
    Employee as e
on p.employee_id=e.employee_id
group by project_id

你可能感兴趣的:(leetcode)