185. 部门工资前三高的所有员工 题目链接:185. 部门工资前三高的所有员工 代码如下: # Write your MySQL query statement belowselect d.Name as 'Department',e1.Name as 'Employee',e1.Salaryfrom Employee as e1 join Department as don
185. 部门工资前三高的所有员工 表: Employee +--------------+---------+| Column Name | Type |+--------------+---------+| id | int || name | varchar || salary | int || de
前述 推荐阅读:通俗易懂的学会:SQL窗口函数 题目描述 leetcode题目 185. 部门工资前三高的所有员工 思路 先按照departmentId分组,再按照salary排序 ==>窗口函数dense_rank() over() select B.name as Department,A.name as Employee,A.salary as Salaryfrom (s
题目: 表: Employee +--------------+---------+| Column Name | Type |+--------------+---------+| id | int || name | varchar || salary | int || departmentId | int