select d.dept_no,d.dept_name, count(s.salary)
from ((departments d left join dept_emp de on d.dept_no=de.dept_no) mark
left join salaries s on mark.emp_no=s.emp_no)
group by d.dept_no
order by d.dept_no
select d.dept_no,d.dept_name, count(s.salary)
from ((departments d left join dept_emp de on d.dept_no=de.dept_no) mark
left join salaries s on mark.emp_no=s.emp_no)
group by d.dept_no
order by d.dept_no