SELECT t.title, avg(s.salary)
FROM titles t INNER JOIN salaries s on t.emp_no=s.emp_no
GROUP BY t.title ORDER BY avg(s.salary);
SELECT t.title, avg(s.salary)
FROM titles t INNER JOIN salaries s on t.emp_no=s.emp_no
GROUP BY t.title ORDER BY avg(s.salary);