select d.department_name, t.avg_salary from departments d,(select e.department_id,avg(salary) avg_salary from employees e group by department_id) t where d.department_id=t.department_id order by t.avg_salary