Output Date Grouping

  • Thread starter Thread starter Sammy
  • Start date Start date
S

Sammy

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
 
Sammy said:
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
 
Back
Top