文章目录 题意思路代码 题意 题目链接 查出每个部门最高工资 思路 子查询+group by 代码 select b.name as Department,a.name as Employee,salary from Employee as a left joinDepartment as b ona.departmentId = b.id where(a.departmentId, salary) in(select departmentId, Max(salary)fromEmployeegroup by departmentId )