If I have a MySQL table such as:
I want to use SQL to calculate the sum of the PositiveResult
column and also the NegativeResult
column. Normally I could simply do SUM(PositiveResult)
in a query.
But what if I wanted to go a step further and place the totals in a row at the bottom of the result set:
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.
Thanks to the respondents. I will now check things with the customer.
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: