Group same records in one field and Total in another

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!
 
K

Ken Sheridan

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
 
H

htherjo

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!
 
Top