title: Exclude a group when one row match in another table
body: <p>I have two tables :</p>
  
  <p>the first one called "card" with one column "id".</p>
  
  <pre><code>| id |
  | 1  |
  | 2  |
  | 3  |
  | .. |
  </code></pre>
  
  <p>The second table is named "waste" with two columns "card_id" and "waste_type".</p>
  
  <pre><code>| card_id | waste_type |
  |   1     |     1      |
  |   1     |     3      |
  |   2     |     2      |
  |   2     |     1      |
  </code></pre>
  
  <p>And i want to select only the card where there is no waste_type = 2</p>
  
  <p>The query should look like this :</p>
  
  <pre><code>SELECT c.id FROM card c
  JOIN waste w
  ON c.id = w.card_id
  WHERE waste_type &lt;&gt; 2
  </code></pre>
  
  <p>I want this result :</p>
  
  <pre><code>id
  1
  </code></pre>
  
  <p>But i get :</p>
  
  <pre><code>id
  1
  2
  </code></pre>
  
  <p>How can i do that ? Thank you so much in advance !</p>