title: combining results of two select statements
body: <p>I'm using T-SQL with ASP.NET, and c# and i'm pretty new to SQL.</p>
  
  <p>I was wondering how i could combine the results of two queries</p>
  
  <p><b>Query1:</b><br/></p>
  
  <pre><code>SELECT tableA.Id,  tableA.Name, [tableB].Username AS Owner, [tableB].ImageUrl, [tableB].CompanyImageUrl, COUNT(tableD.UserId) AS NumberOfUsers
   FROM tableD RIGHT OUTER JOIN 
           [tableB] INNER JOIN
           tableA ON [tableB].Id = tableA.Owner ON tableD.tableAId = tableA.Id
   GROUP BY tableA.Name, [tableB].Username, [tableB].ImageUrl, [tableB].CompanyImageUrl
  </code></pre>
  
  <p><b>Query2:</b><br/></p>
  
  <pre><code> SELECT tableA.Id,  tableA.Name, COUNT([tableC].Id) AS NumberOfPlans
   FROM   [tableC] RIGHT OUTER JOIN
             tableA ON [tableC].tableAId = tableA.Id
   GROUP BY tableA.Id, tableA.Name
  </code></pre>
  
  <p>Any help would be much appreciated.
  Thanks in advance</p>