mysql> SELECT d.name, count(e.emp_id) num_employees -> FROM department d INNER JOIN employee e -> ON d.dept_id = e.dept_id -> GROUP BY d.name -> HAVING count(e.emp_id) > 2; +----------------+---------------+ | name | num_employees | +----------------+---------------+ | Administration | 3 | | Operations | 14 | +----------------+---------------+ 2 rows in set (0.00 sec)