Im trying to create a sum of a rowset, including other fields that those used in the sum.
Consider this table:
| Money | Person |
============
| 10 | A |
| 15 | A |
| 20 | A |
| 10 | B |
| 20 | B |
Im trying to return the following result:
| Sum | Person |
===========
| 45 | A |
| 30 | B |
I can't figure out how to combined the SELECT Sum(Money) statement with the SELECT Sum, Person statement. Anyone have a good idea how to do this ?
NB: Im using the SQL dialect supplied by MSSQL server