Sum Query

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
 
B

Brian Camire

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]
 

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

Similar Threads

Sorting and filtering text 0
Prompt in query 4
Pls help with SQL query 12
SQL 2
Query Problem... 1
query to get top player 8
Problem with "Top N Value" Query 4
Access Checkbox and Sum (right post) 2

Top