1、题目描述:
输入描述:
无
输出描述:
title | avg |
---|---|
Engineer | 94409.0 |
Senior Engineer | 69009.2 |
Senior Staff | 91381.0 |
Staff | 72527.0 |
2、代码:考察 group by 的条件在的位置对应的语法,考察聚合函数平均数的使用。
select t.title,avg(s.salary) from titles t left join salaries s on t.emp_no=s.emp_no where t.to_date=‘9999-01-01‘ and s.to_date=‘9999-01-01‘ group by t.title;
16、统计出当前各个title类型对应的员工当前薪水对应的平均工资
原文:https://www.cnblogs.com/guoyu1/p/12242281.html