title: Add values in two rows together and group
body: <p>[SQL Server Management Studio 2016, TSQL]</p>
  
  <p>Could you help me with this SQL please?</p>
  
  <p>I have the below rows:</p>
  
  <pre><code>Account Reference | Balance
        100291         -301
        100291          157
        102388          203
  </code></pre>
  
  <p>However I want to add the balance of the first two rows together and group by Account reference like the below:</p>
  
  <pre><code>Account Reference | Balance
        100291         -144
        102388          203
  </code></pre>
  
  <p>For your reference, the code for this is below:</p>
  
  <pre><code>SELECT
      RB.AccountReference,
      RB.CurrentBalance
  FROM SB_RentAccountBalances_V RB
      LEFT JOIN RentAccounts RA ON RB.AccountReference = RA.ID
  </code></pre>
  
  <p>Could someone please give me advice on how I can do this?</p>