title: MySQL query find matching column based on another column?
body: <p>Sorry I don't know how to word the question's title.
  I have a table like this</p>
  
  <pre><code>Prod       Part      Number
  
  0001       101       3
  0001       102       2
  0001       103       1
  
  0002       101       3
  0002       102       2
  0002       103       4
  
  0003       101       2
  0003       102       3
  0003       103       6
  
  0004       101       3
  0004       102       2
  0004       103       1
  </code></pre>
  
  <p>I want to find the product that has the correct number per part for all parts.
  So something like</p>
  
  <pre><code>SELECT Prod from table 
  WHERE     (Number of Part(101)) = 3 
        AND (Number of Part(102)) = 2 
        AND (Number of Part(103)) = 1
  </code></pre>
  
  <p>Output would be:</p>
  
  <pre><code>Prod
  0001
  0004
  </code></pre>
  
  <p>How can I achieve that?</p>