两表联查,以title 进行分组 最后去重
select distinct title,avg(salary) from titles join salaries using(emp_no) group by title;