184. Department Highest Salary
问题描述
解决方案
select b.Name Department,a.Name Employee,a.Salary from
(
select e1.Salary,e1.Name,e1.DepartmentId from Employee e1
where e1.Salary=(select max(Salary) from Employee e2 where e1.DepartmentId=e2.DepartmentId)
) a,Department b
where a.DepartmentId=b.Id
作者:弦断
出处:http://www.cnblogs.com/ucas/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。