https://leetcode.com/problems/project-employees-i/description/
Project Employees I - LeetCode
Can you solve this real interview question? Project Employees I - Table: Project +-------------+---------+ | Column Name | Type | +-------------+---------+ | project_id | int | | employee_id | int | +-------------+---------+ (project_id, employee_id) is th
leetcode.com
1
2
3
4
5
6
|
# Write your MySQL query statement below
select p.project_id, round(sum(e.experience_years)/count(p.project_id), 2) average_years
from Project p
join Employee e
on p.employee_id =e.employee_id
group by p.project_id
|
cs |
반응형
'SQL' 카테고리의 다른 글
leetcode 1757. Recyclable and Low Fat Products (0) | 2023.05.29 |
---|---|
leetcode https://leetcode.com/problems/last-person-to-fit-in-the-bus/ (0) | 2023.04.21 |
leetcode 1934. Confirmation Rate (0) | 2023.04.21 |
leetcode 1661. Average Time of Process per Machine (0) | 2023.04.14 |
leetcode 1068. Product Sales Analysis I (0) | 2023.04.14 |
댓글