题解 | 聚合函数不能直接在where字句中使用
平均工资
https://www.nowcoder.com/practice/95078e5e1fba4438b85d9f11240bc591
select avg(salary) avg_salary from salaries where to_date='9999-01-01' and salary>(select min(salary) from salaries where to_date='9999-01-01') and salary<(select max(salary) from salaries where to_date='9999-01-01')
聚合函数只能在SELECT
、HAVING
和ORDER BY
子句中使用