Leetcode PostgreSQL Project Employees I

업데이트:

문제

Link

코드

-- Write your PostgreSQL query statement below
SELECT Project.project_id
	, ROUND(AVG(Employee.experience_years), 2) AS average_years
FROM Project
JOIN Employee ON Employee.employee_id = Project.employee_id
GROUP BY Project.project_id

결과

Link

설명

  1. Project 별 Employee의 평균 경력을 소수점 2자리까지 계산하는 문제이다.

댓글남기기