文章目录
-
- 原题题目
- 代码实现(首刷自解)
原题题目
代码实现(首刷自解)
# Write your MySQL query statement below
SELECT project_id,employee_id
FROM (SELECT project_id,p.employee_id,DENSE_RANK() OVER(PARTITION BY project_id ORDER BY experience_years DESC) AS rankingFROM project AS p LEFT JOIN employee AS e ON p.employee_id = e.employee_id) t
WHERE ranking = 1