title: Select parent if all children meet criteria
body: <p>I have tables set up like so:</p>
  
  <pre><code>Parent
  ------
  id, ...
  
  Child
  -----
  id, parent_id, x, y
  </code></pre>
  
  <p>I want to find the Parents, or the distinct parent_id(s), if <em>all</em> of the rows in Child containing a given parent_id meet a criteria involving x and y(in my case x = y).</p>
  
  <p>For example:</p>
  
  <pre><code>Parent
  ------
  id
   1
   2
   3
  
  Child
  id, parent_id, x, y
  1,      1,     2, 3
  2,      1,     3, 4
  3,      2,     5, 5
  4,      2,     6, 7
  5,      3,     8, 8
  6,      3,     9, 9
  </code></pre>
  
  <p>would result in 3.  Currently, I have a query that finds parent_ids that <em>any</em> of the children meet the criteria.  I then use that to retrieve those records and check them in code if all the children meet the criteria.  With the example data, I get parent_id 2 and 3, get the two parent records with all children, and evaluate.  I want to do this with a single query, if possible.</p>