当前位置: 代码迷 >> 综合 >> Leetcode Mysql 1077. 项目员工 III(DAY 11)
  详细解决方案

Leetcode Mysql 1077. 项目员工 III(DAY 11)

热度:35   发布时间:2023-11-17 16:59:46.0

文章目录

    • 原题题目
    • 代码实现(首刷自解)


原题题目


在这里插入图片描述


代码实现(首刷自解)


# 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
  相关解决方案