select avg(dept_salary) as overall_avg_salary from(select department_id,avg(salary) as dept_salary from employees group by department_id)as totalsalary;