题解 | #统计出当前各个title类型对应的员工当前薪水对应的平均工资#
统计出当前各个title类型对应的员工当前薪水对应的平均工资
http://www.nowcoder.com/practice/c8652e9e5a354b879e2a244200f1eaae
分析:平均工资使用聚合函数avg(),根据字段title,在根据平均工资升序asc(可省略) select a.title, avg(b.salary) from titles a left join salaries b on a.emp_no =b.emp_no group by a.title order by avg(b.salary);