title: NSPredicate equivalent of SQL HAVING
body: <p>Here's the abstract situation: I have CoreData objects 'car' and 'review'.'review' can be 'good','bad' or 'meh', car->review is one-to-many.</p>
  
  <p>I am trying to build an NSPredicate to get all 'car' objects with more than 3 'good' reviews.</p>
  
  <p>In SQL I'd do something like:</p>
  
  <pre><code>SELECT car.name,COUNT(review.id) AS good_reviews 
    FROM car JOIN review ON (car.id=review.car_id)
    WHERE review.type='good'
    GROUP BY car.name
    HAVING good_reviews&gt;3;
  </code></pre>
  
  <p>What's the predicate way of thinking about these kinds of selections?</p>
  
  <p>'ANY' will let me match cars with at least 1 review of a given type, but what about more specific numbers?</p>
  
  <p>Thanks for any help, and apologies if I've missed something obvious.</p>
  
  <p>Peter</p>