title: Oracle SELECT statement with GROUP BY and multiple WHERE clauses
body: <p>I'm having trouble with a select query. See sample data below. I want to select the Sku records where there is no stock quantity for warehouse id 1, but there is stock quantity for warehouse id 2 &amp; 3. Not sure what I'm doing wrong?</p>
  
  <p><strong>SAMPLE TABLE DATA</strong></p>
  
  <pre><code>Sku         WhseId      Qty
  ============================
  ABC-123     1           6
  ABC-123     2           3
  ABC-123     3           2
  XYZ-789     1           0
  XYZ-789     2           1
  XYZ-789     3           3
  DEF-456     1           0
  DEF-456     2           0
  DEF-456     3           3
  </code></pre>
  
  <p><strong>QUERY</strong></p>
  
  <pre><code>SELECT Sku, WhseId, Qty
  FROM PRODUCTS
  WHERE (WhseId = 1 AND Qty &lt; 1)
  AND (WhseId = 2 AND Qty &gt; 0
  AND (WhseId = 3 AND Qty &gt; 0)
  GROUP BY Sku, WhseId, Qty
  </code></pre>
  
  <p><strong>DESIRED RESULT</strong></p>
  
  <pre><code>Sku         WhseId      Qty
  ============================
  XYZ-789     1           0
  XYZ-789     2           1
  XYZ-789     3           3
  </code></pre>