title: MySQL - Discard record if not unique with condition
body: <p>i'm trying to built this query, I think is a little bit complex to optimize it without using subqueries.</p>
  
  <pre><code>| baggage_id | checkpoint | status |
  |------------|------------|--------|
  | 1          | 3          | 1      |
  | 2          | 3          | 1      |
  | 2          | 5          | 1      |
  | 3          | 3          | 0      |
  | 4          | 3          | 1      |
  | 5          | 3          | 1      |
  | 6          | 3          | 0      |
  </code></pre>
  
  <p>This should be returning</p>
  
  <pre><code>| baggage_id | checkpoint | status |
  |------------|------------|--------|
  | 1          | 3          | 1      |
  | 4          | 3          | 1      |
  | 5          | 3          | 1      |
  </code></pre>
  
  <p>I only requires the bagagges_id where:</p>
  
  <ul>
  <li>checkpoint = 3 </li>
  <li>status = 1</li>
  <li>There is not baggage_id with checkpoint = 5 AND status = 1</li>
  </ul>
  
  <p>Could someone help me?</p>
  
  <p>Thanks.</p>