简单的多表查询

select a.title ,avg(a.salary) from
(select a.emp_no,title,salary from titles a left join  salaries b on a.emp_no=b.emp_no )a
group by a.title order by avg(a.salary)