184:最值

select 
d.name as department,
e.name as employee,
salary
from employee e
join department d
on e.departmentid=d.id
where (departmentid,salary) in
(select departmentid,max(salary) 
from employee 
group by departmentid);

先连接两张表
然后在查找
这道题注意group by的内容前面需要有
两条的带()
同时注意max
还有in