select avg(salary) as avg_salary
from salaries
where salary !=(select max(salary) from salaries where to_date='9999-01-01')
and salary !=(select min(salary) from salaries where to_date='9999-01-01')
and to_date='9999-01-01'
1.一开始报错点 'Operand should contain 1 column(s)',在于子查询只能返回一个值,而我填写了了max()和min()两个字段
2.第二次全部用例没有通过是因为,没有在子查询中加上to_date='9999-01-01'