title: SQL one select with different where clauses
body: <p>i need to do one select with different where clauses (with different product code). The result which i need is below. </p>
  
  <p><strong>I have table like:</strong></p>
  
  <pre><code>ApID | Date       | Code | Qty | Price | Sum
  222  | 2014-10-11 | 555  | 1   | 2,22  | 2,22
  222  | 2014-10-11 | 555  | 1   | 2,22  | 2,22
  222  | 2014-10-11 | 333  | 1   | 3,33  | 3,33
  222  | 2014-10-12 | 555  | 1   | 2,22  | 2,22
  </code></pre>
  
  <p><strong>My query:</strong></p>
  
  <pre><code>SELECT 
  CAST(Date AS DATE) as 'Data',
  SUM(Qty*Price) AS 'Sum',
  SUM(Qty) AS 'Qty'
    FROM Table
    WHERE ApID = 222
    AND Data BETWEEN '2014-10-11' AND '2014-10-13' 
    AND Code LIKE '555'
  GROUP BY CAST(KvitoGalva.Data AS DATE)
  </code></pre>
  
  <p><strong>I get result like this:</strong></p>
  
  <pre><code>Data       | Sum  | Qty
  2014-10-11 | 4.44 | 2
  2014-10-12 | 2.22 | 1
  </code></pre>
  
  <p><strong>I need to display result in one table:</strong></p>
  
  <pre><code>Data       | Sum 555  | Qty 555 | Sum 333 | Qty 333 |
  2014-10-11 | 4.44     | 2       | 3.33    | 1       |
  2014-10-12 | 2.22     | 1       | 0       | 0       |
  </code></pre>
  
  <p>Tried:</p>
  
  <pre><code>SELECT((Select1),(Select2))
  ----------------------------
  SELECT 1
  union
  select 2
  </code></pre>