麻了是求在职人员去掉最大值和最小值的平均工资,所以只是to_data = '9999-01-01'的平均工资。。。。。。 select avg(salary) avg_salary from (select max(salary) max_salary,min(salary) min_salary from salaries where to_date = '9999-01-01') s1 left join salaries s2 on s2.salary < s1.max_salary and s2.salary > s1.min_salary and s2.to_...