title: Disconnected from the rest of the join graph
body: <p>My task is to query a database, selecting the number of persons that work in the most numerous department. I do the following:</p>
  
  <pre><code>select count(*) from Persons join Departments using (Department_id)
  where Department_id = 
  (select Department_id from Persons join Departments using (Department_id) 
   group by Department_id having count(*) = 
    (select max(count(*)) from Persons 
     join Departments using (Department_id) group by Department_id)
  );
  </code></pre>
  
  <p>And it works fine, but I get a warning, that Persons is disconnected from the rest of the join graph. Is there something faulty with this solution? Or perhaps it could be done easier?</p>