Group same records in one field and Total in another

  • Thread starter Thread starter htherjo
  • Start date Start date
H

htherjo

hello,

I have two columns in my querie. The first is Expenditure Authority and the
second is Trans Amt. Sample data is below.

Expenditure Authority Trans Amt.
913020 155565
913020 7555
913020 8844
0A730K 11122
0A730K 25447
0A730K 87445
0A730K 986
606700 7566
606700 12554

What I would like to do is group all like Expenditure Authority's and total
the sum for each Expenditure Authority.

End result would look like this...

Expenditure Authority Trans Amt.
913020 171964
0A730K 125000
606700 20120

Can anyone help me with this calculation? I really appreciate any and all
help!

Thank you!
 
Group by the expenditure authority and sum the trans amt, e.g.

SELECT [Expenditure Authority],
SUM([Trans Amt] AS SumOfTransAmt
GROUP BY [Expenditure Authority];

In query design view you'd select Totals from the View menu, then Group By
and Sum in the Total row as appropriate for each column.

Ken Sheridan
Stafford, England
 
Ken, Thank you so much!

Ken Sheridan said:
Group by the expenditure authority and sum the trans amt, e.g.

SELECT [Expenditure Authority],
SUM([Trans Amt] AS SumOfTransAmt
GROUP BY [Expenditure Authority];

In query design view you'd select Totals from the View menu, then Group By
and Sum in the Total row as appropriate for each column.

Ken Sheridan
Stafford, England

htherjo said:
hello,

I have two columns in my querie. The first is Expenditure Authority and the
second is Trans Amt. Sample data is below.

Expenditure Authority Trans Amt.
913020 155565
913020 7555
913020 8844
0A730K 11122
0A730K 25447
0A730K 87445
0A730K 986
606700 7566
606700 12554

What I would like to do is group all like Expenditure Authority's and total
the sum for each Expenditure Authority.

End result would look like this...

Expenditure Authority Trans Amt.
913020 171964
0A730K 125000
606700 20120

Can anyone help me with this calculation? I really appreciate any and all
help!

Thank you!
 

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

Back
Top