SELECT A.dept_no, B.dept_name, C.title, COUNT( title ) AS count FROM dept_emp AS A LEFT JOIN departments AS B ON A.dept_no = B.dept_no LEFT JOIN titles C ON A.emp_no = C.emp_no WHERE C.title IS NOT NULL GROUP BY A.dept_no, B.dept_name, C.title ORDER BY A.dept_no asc, C.title asc;