title: SQL query - sum of values by status for date interval
body: <p>I get crazy because of one query. I have a table like following and I want to get a data -  <strong>Summa of Values by Status For every Date in interval.</strong> </p>
  
  <p><strong>Table</strong></p>
  
  <pre><code>Id    Name    Value    Date        Status
  1     pro1    2        01.04.14    0 
  2     pro1    8        02.04.14    1 
  3     pro2    6        02.04.14    1
  4     pro3    0        03.04.14    0
  5     pro4    7        03.04.14    0
  6     pro4    2        03.04.14    0
  7     pro4    4        03.04.14    1
  8     pro4    6        04.04.14    1
  9     pro4    1        04.04.14    1
  </code></pre>
  
  <p>For example,</p>
  
  <p><em>Input:</em>  <strong>Name = pro4, minDate = 01.02.14, maxDate = 04.09.14</strong></p>
  
  <p><em>Output:</em></p>
  
  <pre><code>Date           Values sum for 0 Status          Values sum for 1 Status    
  01.04.14       0                                0
  02.04.14       0                                0
  03.04.14       9   (=7+2)                       4  (only 4 exist)
  04.04.14       0                                7  (6+1)
  </code></pre>
  
  <p>In <code>01.02.14</code> and <code>02.04.14</code> dates, <code>pro4</code> has not values by status, but I want to show that rows, because I need all dates in that interval. Can anyone help me to create this query?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I can not change structure, I have already that table with data. Every day exist in table many times (minimum 1 time)</p>
  
  <p>Thanks in advance.</p>