用where根据emp_no连接两个表,用group by根据title分组,然后根据根据聚合函数avg(salary)的结果进行排序,最后选出title和avg(salary)
select t.title, avg(s.salary) from titles as t, salaries as s
where t.emp_no = s.emp_no
group by t.title
order by avg(s.salary)
用where根据emp_no连接两个表,用group by根据title分组,然后根据根据聚合函数avg(salary)的结果进行排序,最后选出title和avg(salary)
select t.title, avg(s.salary) from titles as t, salaries as s
where t.emp_no = s.emp_no
group by t.title
order by avg(s.salary)