Reputation: 307
How would you go from...
FirstName|LastName|Description|Sum of Payment Types
Stone |Striclan|FICA |-4001.56
Stone |Striclan|Cost of Lab|20000.78
to
FirstName|LastName|Total Pay
Stone |Striclan|15,999.22
Basically I'm just trying to add up all of the sum of payments for each name in a query, regardless of description. Could you go about this by using the firstname as a keyword or something? Any and all help is much appreciated.
Upvotes: 1
Views: 57
Reputation: 1271151
This is a basic aggregation query:
select FirstName, LastName, sum([Sum of Payment Types]) as [Total Pay]
from YourTable
group by FirstName, LastName ;
Upvotes: 2
Reputation: 75
SELECT firstname,lastname,sum(total_field_name) FROM table ORDER BY firstname,lastname;
Upvotes: 0