title: MySQL SUM IF field b = field a
body: <pre><code>SELECT 
    incMonth as Month, 
    SUM( IF(item_type IN('typ1', 'typ2') AND incMonth = Month, 1, 0 ) )AS 'Total Sales' 
  FROM tester
  </code></pre>
  
  <p>I just need the sum for the current month its looping through.</p>