title: Getting rows which have a certain revision_status
body: <p>I am using mysql and I have two tables:</p>
  
  <p><strong>Product Table:</strong></p>
  
  <pre><code>| id | name      | prices | revision_id |
  |----|-----------|--------|-------------|
  | 1  | Produkt 1 | 10     | 1           |
  | 2  | Produkt 1 | 4      | 2           |
  | 3  | Produkt 1 | 2      | 3           |
  | 4  | Product 2 | 42     | 4           |
  | 5  | Produkt 2 | 43     | 5           |
  | 6  | Produkt 3 | 78     | 6           |
  </code></pre>
  
  <p>Each product has had price changes. That is why the name is still the same, but the products have a different price.</p>
  
  <p><strong>Revisions Table:</strong></p>
  
  <pre><code>| id | revision_status |
  |----|-----------------|
  | 1  | 1               |
  | 2  | 0               |
  | 3  | 0               |
  | 4  | 1               |
  | 5  | 0               |
  | 6  | 1               |    
  </code></pre>
  
  <p>Inside the revision table, <code>0</code> indicates an open change, not approved change. <code>1</code> indicates - closed - an approved change.</p>
  
  <p><strong><em>Expected Result:</em></strong></p>
  
  <pre><code>| id | name      | prices | revision_id | revision_status |
  |----|-----------|--------|-------------|-----------------|
  | 1  | Produkt 1 | 10     | 1           | 1               |
  | 2  | Produkt 1 | 4      | 2           | 0               |
  | 3  | Produkt 1 | 2      | 3           | 0               |
  | 4  | Product 2 | 42     | 4           | 1               |
  | 5  | Produkt 2 | 43     | 5           | 0               |
  </code></pre>
  
  <p>Basically I want all products that have revisions - a <code>revision_status</code> of 0 on it, to see which products actually have revisions.</p>
  
  <p>For example.: <code>Product 3</code> does not have any price changes, so it should not appear in the final result.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>select *
    from product
    JOIN revisions 
      on product.revisions_id = revisions.id 
   ORDER 
      BY product.name
  </code></pre>
  
  <p>However, I still get <code>Product 3</code> in my table and I am not sure how to get all products that have a revision_status of 0 on it.</p>
  
  <p>I highly appreciate your replies!   </p>