title: Select count(*) or zero
body: <p>Tiredness prevents me from finding this one... Say you have the following tables:</p>
  
  <p><strong>Parent</strong></p>
  
  <ul>
  <li>PARENT_ID (LONG)</li>
  </ul>
  
  <p><strong>Child</strong></p>
  
  <ul>
  <li>CHILD_ID (LONG)</li>
  <li>PARENT_ID (LONG, FK)</li>
  <li>HAS_GRADUATED (BOOLEAN)</li>
  </ul>
  
  <p>I want a query to return the following <strong>true</strong> (1, in the case of Oracle) if the parent has at least one child that has graduated, and <strong>false</strong> (0, in the case if Oracle) if the parent does not have a child that has graduated, <strong>or has no children at all</strong>:</p>
  
  <blockquote>
    <p>PARENT_ID................HAS_CHILDREN_WHO_GRADUATED</p>
    
    <p>5.................................1</p>
    
    <p>3.................................1</p>
    
    <p>6.................................0</p>
    
    <p>2.................................0</p>
  </blockquote>
  
  <p>In the above, parent with parent_id=5 may have >=1 children that have graduated. Same is parent with parent_id=3. Parent with parent_id=6 either has no children at all, or has children but none of them has graduated.</p>
  
  <p>What would the query to this be like?</p>