title: sql query for each day
body: <p>i have a table main:  </p>
  
  <pre><code>(  
  time date,  
  qty int  
  )  
  </code></pre>
  
  <p>i want to create a query so for each day i get the sum of qty on that day and all days before that
  so for this data</p>
  
  <pre><code>-----------------------    
  time        | qty    
  01/09/2009  | 3   
  02/09/2009  | 8  
  03/09/2009  | 2 
  04/09/2009  | 5 
  </code></pre>
  
  <p>i get:</p>
  
  <pre><code>-----------------------    
  time        | total    
  01/09/2009  | 3   
  02/09/2009  | 11  
  03/09/2009  | 13 
  04/09/2009  | 18 
  </code></pre>
  
  <p>thanks in advance</p>