题解 | #统计出当前各个title类型对应的员工当前薪水对应的平均工资#
统计出当前各个title类型对应的员工当前薪水对应的平均工资
http://www.nowcoder.com/practice/c8652e9e5a354b879e2a244200f1eaae
select
t.title,
avg(s.salary) as avg
from
titles t,
salaries s
where
t.emp_no = s.emp_no
group by //各个title类型分组
title
order by //默认升序排列
avg;
t.title,
avg(s.salary) as avg
from
titles t,
salaries s
where
t.emp_no = s.emp_no
group by //各个title类型分组
title
order by //默认升序排列
avg;