select dept_emp.dept_no,d.dept_name,t.title,count(t.title) c from dept_emp left join departments d on dept_emp.dept_no=d.dept_no left join titles t on dept_emp.emp_no=t.emp_no group by dept_emp.dept_no,t.title order by dept_emp.dept_no asc,t.title asc