答案 0 :(得分:0)
select name as Employeename,(select t.name from table t where t.id=managerId) as ManagerName,(select max(u.sallary) from table u where u.managerId=managerId) as MaxSalary from table
这将为您提供预期的结果
答案 1 :(得分:0)
SELECT b.name,e.name as managerName,max(b.Salary)
FROM Employee b
JOIN Employee e ON b.Id= e.ManagerId