title: SQL query to return data only if ALL necessary columns are present and not NULL
body: <pre><code>ID | Type     | total
  1    Purchase   12
  1    Return     2
  1    Exchange   5
  2    Purchase   null
  2    Return     5
  2    Exchange   1
  3    Purchase   34
  3    Return     4
  3    Exchange   2
  4    Purchase   12
  4    Exchange   2
  </code></pre>
  
  <p>Above is sample data. What I want to return is:</p>
  
  <pre><code>ID | Type     | total
   1    Purchase   12
   1    Return     2
   1    Exchange   5
   3    Purchase   34
   3    Return     4
   3    Exchange   2
  </code></pre>
  
  <p>So if a field is null in total or the values of Purchase, Return and Exchange are not all present for that ID, ignore that ID completely. How can I go about doing this?</p>