If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Output Date Grouping
I have data in the following columns
The 5 columns of data are as below A B C D E Acct Subacct Project DebitAmt CreditAmt I want to output via a report /or send to Excel data that will get summarised DebitAmt and CreditAmt by Account, Subaccount, Project I was trying to sum of the Totals of the DebitAmt and the CreditAmt for each Distinct (Acct, Subacct, Project) So I would have distinct Acct Sub Project Sum(DebitAmt) Sum(CreditAmt) I would really apprecaite some guidance on howI can accomplish this as I am a complete novice at this. Thanks Sam |
#2
|
|||
|
|||
Output Date Grouping
"Sammy" wrote in message ... I have data in the following columns The 5 columns of data are as below A B C D E Acct Subacct Project DebitAmt CreditAmt I want to output via a report /or send to Excel data that will get summarised DebitAmt and CreditAmt by Account, Subaccount, Project I was trying to sum of the Totals of the DebitAmt and the CreditAmt for each Distinct (Acct, Subacct, Project) So I would have distinct Acct Sub Project Sum(DebitAmt) Sum(CreditAmt) I would really apprecaite some guidance on howI can accomplish this as I am a complete novice at this. Thanks Sam The following query should do it ... SELECT Acct, Subacct, Project, Sum(DebitAmt) AS DebitTotal, Sum(CreditAmt) AS CreditTotal FROM YourTableNameHere GROUP BY Acct, Subacct, Project -- Brendan Reynolds |
Thread Tools | |
Display Modes | |
|
|