title: SQL to add a summary row to MySQL result set
body: <p>If I have a MySQL table such as:</p>
  
  <p><a href="https://i.stack.imgur.com/bcssV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bcssV.png" alt="enter image description here"></a> </p>
  
  <p>I want to use SQL to calculate the sum of the <code>PositiveResult</code> column and also the <code>NegativeResult</code> column. Normally I could simply do <code>SUM(PositiveResult)</code> in a query.</p>
  
  <p>But what if I wanted to go a step further and place the totals in a row at the bottom of the result set:</p>
  
  <p><a href="https://i.stack.imgur.com/RLJlB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RLJlB.png" alt="enter image description here"></a></p>
  
  <p>Can this be achieved at the data level or is it a presentation layer issue? If it can be done by SQL, how might I do this? I am a bit of an SQL newbie.</p>
  
  <p>Thanks to the respondents. I will now check things with the customer.</p>
  
  <p>Also, can a text column be added so that the value of the last row of data is not shown in the summary row? Like this:</p>
  
  <p><a href="https://i.stack.imgur.com/38To8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/38To8.png" alt="enter image description here"></a></p>