title: Sum results from two select statements
body: <p>Our employees are paid commission on a weekly basis and because of a bonus structure i have to calculate two separate weeks of pay and then add the two together.</p>
  
  <p>I have the following SQL statement which gets the two separate weeks results</p>
  
  <pre><code>    SELECT  PerceptionistID, SSNLastFour, CommissionPay,
          PTOPay, HolidayPay, Overtime, TotalPay
      FROM [dbo].fnCalculateCommissionForWeekOf(@MondayOfCurrentWeek)
  
      UNION
  
      -- Need to get the following week's data and sum the two together
      SELECT  PerceptionistID, SSNLastFour, CommissionPay,
          PTOPay, HolidayPay, Overtime, TotalPay
      FROM [dbo].fnCalculateCommissionForWeekOf(@MondayOfFollowingWeek)
  </code></pre>
  
  <p>This gets me the data I need but I would like to combine the two results into one table with the same columns but having some of the columns added together (CommissionPay, PTOPay, HolidayPay, Overtime, TotalPay).  What is the best way to do this?  I am using SQL Server 2008 R2.</p>