title: SQL subquery returns no results
body: <p>I'm trying to display the number of employees working in the department with the most employees. But the query i have returns no output, it doesn't fail but no data is returned. I am using Oracle SQL developer but most forms of SQL should help.</p>
  
  <p>Sorry I should have specified but this is for a class and the teacher wants only subqueries NOT joins.</p>
  
  <pre><code>select d.DEPARTMENT_ID, d.DEPARTMENT_NAME, count(e.employee_id)
  from departments d, employees e
  where d.department_id = (select max(count(employee_id)) from employees group by 
  department_id)
  group by d.department_id, d.department_name;
  </code></pre>