自定义每个部门最高薪水表,然后三个表连接查询
select d.Name as Department, e.Name as Employee, e.Salary as Salary
from Employee e, Department d ,
(select DepartmentId ,MAX(Salary) as Salary from Employee group by DepartmentId ) t
where e.DepartmentId=t.DepartmentId and e.Salary=t.Salary and d.Id=e.DepartmentId;
本文介绍如何自定义每个部门的最高薪水表,并通过连接查询来获取详细信息。
1056

被折叠的 条评论
为什么被折叠?



