Output Date Grouping

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
 
B

Brendan Reynolds

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top