title: SQL Server 2008 - Combine SUM queries from different tables into 1 result set
body: <p>I am trying to run some reports on the database (SQL Sever 2008) for our Incident Management System.
  There are 2 tables, one containing Incident data and one containing Task data</p>
  
  <p>The Incident table might look like this</p>
  
  <pre><code>Ref#  OpenDate  Category          Group  State
  111   1/4/15    IncidentRequest   A      Open
  112   1/4/15    ServiceRequest    A      Open
  113   2/4/15    SalesRequest      A      Closed
  114   3/4/15    IncidentRequest   B      Open
  </code></pre>
  
  <p>The Task table might look like this</p>
  
  <pre><code>TaskRef#  OpenDate  Group  State
  211       1/4/15    A      Open
  212       1/4/15    A      Open
  213       4/4/15    B      Closed
  214       5/4/15    A      Closed
  </code></pre>
  
  <p>I would like to run a query that would return
  OpenDate, SUM(IncidentRequest), SUM(ServiceRequest), SUM(SalesRequest), COUNT(Tasks) for Group A
  so basically the amount of all Incidents, Service Requests, Sales Requests and Tasks for each OpenDate where the Group is A</p>
  
  <p>Ideally I would also like to minimise load on the SQL server, speed is not a huge priority</p>
  
  <p>I have looked at JOINS, UNIONS etc but I am very new to SQL and find myself suffering from a bit of information overload.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks,
  DT</p>