title: How can I combine these queries?
body: <p>I have 5 queries I'd like to join together. Basically what they do is they go though the database and select how much a tenant has paid, and how much a tenant owes based on how long ago he or she was charged.</p>
  
  <p>I have four categories<br>
  Charge &lt; 30 days old<br>
  Charge &lt; 60 AND >= 30 days old<br>
  Charge &lt; 90 AND >= 60 days old<br>
  Charge > 90 days old  </p>
  
  <p>I know how to get all those values separately, but how can I get them together, plus the amount the tenant has paid?</p>
  
  <p>Here are my queries:<br>
  <strong>Amount the Tenant Has Paid</strong></p>
  
  <pre><code>SELECT TransactionCode, TenantID, SUM(Amount) AS Paid FROM tblTransaction
  WHERE Amount &gt; 0
  GROUP BY TransactionCode, TenantID
  </code></pre>
  
  <p><strong>Charge is less than 30 days old</strong></p>
  
  <pre><code>SELECT TransactionCode, TenantID, SUM(Amount) AS ChargedCurrent FROM tblTransaction
  WHERE Amount &lt; 0 AND TransactionDate &gt; DATEADD("dd", -30, GETDATE())
  GROUP BY TransactionCode, TenantID
  </code></pre>
  
  <p><strong>Charge is less than 60 days old, but older than 29 days</strong></p>
  
  <pre><code>SELECT TransactionCode, TenantID, SUM(Amount) AS ChargedOver30 FROM tblTransaction
  WHERE Amount &lt; 0 AND TransactionDate &gt; DATEADD("dd", -60, GETDATE()) AND TransactionDate &lt;= DATEADD("dd", -30, GETDATE())
  GROUP BY TransactionCode, TenantID
  </code></pre>
  
  <p><strong>Charge is less than 90 days old, but older than 59 days</strong></p>
  
  <pre><code>SELECT TransactionCode, TenantID, SUM(Amount) AS ChargedOver60 FROM tblTransaction
  WHERE Amount &lt; 0 AND TransactionDate &gt; DATEADD("dd", -90, GETDATE()) AND TransactionDate &lt;= DATEADD("dd", -60, GETDATE())
  GROUP BY TransactionCode, TenantID
  </code></pre>
  
  <p><strong>Charge is older than 89 days</strong></p>
  
  <pre><code>SELECT TransactionCode, TenantID, SUM(Amount) AS ChargedOver90 FROM tblTransaction
  WHERE Amount &lt; 0 AND TransactionDate &lt;= DATEADD("dd", -90, GETDATE())
  GROUP BY TransactionCode, TenantID
  </code></pre>
  
  <p>How can I get these all with one query?</p>