select
    title,
    avg(salary) as sal
from
    titles
    inner join salaries on titles.emp_no = salaries.emp_no
group by title
order by sal asc