Galapagos15
Board Regular
- Joined
- Sep 16, 2015
- Messages
- 100
If I have a select query which groups "Company" and sums the "Blled Amt" how can I make an aggregate "Total" show in my results when the query is run? For example, I would want the $60 aggregate total to show when the query is run?
SQL Coding:
SELECT Table1.[Company], Sum(Table1.[Billed Amt]) AS [SumOfBilled Amt]
FROM Table1
GROUP BY Table1.[Company];
Current Results:
Company_______________SumOf BILLED AMT
C&O_______________________$10
Barner_____________________$20
Granger____________________$30
Desired Results:
Company_______________SumOf BILLED AMT
C&O_______________________$10
Barner_____________________$20
Granger____________________$30
Total-______________________$60
SQL Coding:
SELECT Table1.[Company], Sum(Table1.[Billed Amt]) AS [SumOfBilled Amt]
FROM Table1
GROUP BY Table1.[Company];
Current Results:
Company_______________SumOf BILLED AMT
C&O_______________________$10
Barner_____________________$20
Granger____________________$30
Desired Results:
Company_______________SumOf BILLED AMT
C&O_______________________$10
Barner_____________________$20
Granger____________________$30
Total-______________________$60