title: SQL Query: Including Two Sums based on different criteria from the same table
body: <p>I currently have the following sql query</p>
  
  <pre><code>SELECT [Date], DATENAME(dw,[Date]) AS Day, SUM(Units) AS TotalUnits
  FROM tblTimesheetEntries 
  WHERE UserID = 'PJW' 
  AND Date &gt;= '2013-01-01' 
  GROUP BY [Date] 
  ORDER BY [Date] DESC;
  </code></pre>
  
  <p>Which returns the Total [Units] for a given user and date.</p>
  
  <p>However I would like to produce two separate Total Units based on a new criteria i.e. whether or not the [Units] where 'Chargeable or Not'.  There is a field in tblTimeSheets called Chargeable which is a boolean (true for chargeable, false for not).  How do I incorporate this to show two Sums one for each type of Units?</p>