title: select total sales per day
body: <p>i have query like this and i wanted to have sum of sales per day</p>
  
  <pre><code>SELECT DATEPART(day,deduction_timestamp) as [day],
  [fare_deduction]
  FROM [dbfastsprocess].[dbo].[vClosingTransitLog]
  WHERE bus_id in ('JEAST', 'MKV004', 'NWTN01')
  and YEAR(deduction_timestamp) = ISNULL(2016, YEAR(deduction_timestamp))
  and MONTH(deduction_timestamp) = ISNULL(10, MONTH(deduction_timestamp))
  GROUP BY DATEPART(day,deduction_timestamp), fare_deduction 
  
  with result :
  
  day              fare_deduction
  --------------------------------
  1                   10.00
  3                   15.00
  3                   2.00
  4                   10.00
  10                  20.00
  31                  12.00
  </code></pre>
  
  <p>and i wanted the result to be like this..</p>
  
  <pre><code> day              fare_deduction
  --------------------------------
  1                   10.00
  3                   17.00
  4                   10.00
  10                  20.00
  31                  12.00
  </code></pre>
  
  <p>and take note that not all day have values and it only display the affected 
    day only. Can help me on these? Thanks!</p>