Sum Query

  • Thread starter Thread starter Raj
  • Start date Start date
R

Raj

I need help in suming a monthly cost. I have 3 fields in
my table that i will need for my query [EquipID],
[stock_sporder].[monthlycst].
19-DSC-983 "N" 16
19-DSC-983 "Y" 180
19-DSC-983 "N" 50
19-DSC-983 "Y" 50
What I want to do is group [Equip] then [stock_sporder]
and the totoal [monthlycst]
result:
19-DSC-983 "Y" 230
19-DSC-983 "N" 66
 
You almost answered your own question.

You might try a query whose SQL looks something like this:

SELECT
[Your Table].[EquipID],
[Your Table].[stock_sporder],
Sum([Your Table].[monthlycst]) AS [Total Cost]
FROM
[Your Table]
GROUP BY
[Your Table].[EquipID],
[Your Table].[stock_sporder]
 
Back
Top