select d.dept_no,d.emp_no,MAX(salary) as maxSalary from dept_emp d inner join salaries s on d.emp_no=s.emp_no group by dept_no 考虑的是先对部门分组,然后求工资最大值,开始运行不通过,一直考虑思路问题,想了想没问题,后面发现是没有加自己定义的别名,导致出现歧义 错误的 select dept_no,emp_no,MAX(salary) as maxSalary from dept_emp d inner join salaries s on d.emp_no=s.em...