|
Prev: Form queries
Next: Query as data source for form
From: htherjo on 23 Jun 2008 18:47 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!
From: Ken Sheridan on 23 Jun 2008 19:00 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" wrote: > 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! > >
From: htherjo on 23 Jun 2008 19:24 Ken, Thank you so much! "Ken Sheridan" wrote: > 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" wrote: > > > 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! > > > > >
|
Pages: 1 Prev: Form queries Next: Query as data source for form |