title: find duplicate records in related tables
body: <p>Consider the following data structure:</p>
  
  <pre><code>parking garages
      |
      |_ garage 1
          |__ red car
          |__ blue car
      |_ garage 2
          |__ yellow car
          |__ orange car
      |_ garage 3
          |__ red car
          |__ red car
          |__ yellow car
  </code></pre>
  
  <p>"parking garages" is a table, and each entry is a foreign key to a "garageCars" table containing one record for each car in the garage. </p>
  
  <p>What I would like to do is write a query that would return "garage 3" because it has 2 red cars</p>
  
  <p>I've tried using the HAVING clause with a count, but this returns all the rows that have more than 1 car. I need something more along the lines of "WHERE count(car) > 1 and car.color = car.color".</p>