184. Department Highest Salary

SELECT dep.Name as Department, emp.Name as Employee, emp.Salary 
from Department dep, Employee emp 
where emp.DepartmentId=dep.Id 
and emp.Salary=(Select max(Salary) from Employee e2 where e2.DepartmentId=dep.Id)

  

posted @ 2017-10-25 04:40  Weiyu Wang  阅读(69)  评论(0编辑  收藏  举报