title: Postgres/SQL - Find records that when joined with another table only have ONE joined record specifically
body: <p>Say I have two tables, where I represent users that have many dogs:</p>
  <p>USERS</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>aaaa</td>
  </tr>
  <tr>
  <td>2</td>
  <td>bbbb</td>
  </tr>
  <tr>
  <td>3</td>
  <td>cccc</td>
  </tr>
  <tr>
  <td>4</td>
  <td>dddd</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>DOGS</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>user_id</th>
  <th>breed</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>1</td>
  <td>poodle</td>
  </tr>
  <tr>
  <td>2</td>
  <td>1</td>
  <td>lab</td>
  </tr>
  <tr>
  <td>3</td>
  <td>2</td>
  <td>lab</td>
  </tr>
  <tr>
  <td>4</td>
  <td>3</td>
  <td>bulldog</td>
  </tr>
  <tr>
  <td>5</td>
  <td>4</td>
  <td>lab</td>
  </tr>
  <tr>
  <td>6</td>
  <td>4</td>
  <td>lab</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to find users who only have one and only one dog of 'lab' breed.</p>
  <p>i.e this being the desired result:</p>
  <p>USERS</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2</td>
  <td>bbbb</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>So in this case, only the dog id 3 matches the requirement because its user only has one dog and it is a lab.</p>
  <p><code>SELECT users.* FROM users INNER JOIN dogs ON users.id = dogs.user_id WHERE dogs.breed = 'lab'</code></p>
  <p>where to go from here? I feel like I'm missing something obvious, and that this would be a common requirement but my google-fu is failing me at this moment. Looking for postgres oriented solutions but any help is welcome!</p>