Sum Query

G

Greg Ripper

I have a table, tblItems, that are entered by teachers, each record has an
autonumber id field, name, quantity ordered, description, cost, and item
number.

I would like to design a query that would take all the like item numbers
add them up and give me a total. How do I do that?

Thanks as Always,

Rip
 
G

Greg Ripper

I also forgot to say that some of the items will have more than 1 in the quantity
ordered field.

Rip


Greg Ripper said:
I have a table, tblItems, that are entered by teachers, each record has an
autonumber id field, name, quantity ordered, description, cost, and item
number.

I would like to design a query that would take all the like item numbers
add them up and give me a total. How do I do that?

Thanks as Always,

Rip

Rip
 
J

John Spencer (MVP)

An example might help us help you. You might use something like:

SELECT ItemNumber, SUM(QuantityOrdered * Cost) as TotalCost
FROM YourTable
Group By ItemNumber

To do this in the query grid

Create a new query with your table
Put ItemNumber in one fiel
Put TotalCost: [QuantityOrdered] * [cost] in a second
Select Totals form the view menu
Choose Group by under the first column
Choose SUM under the second column
 

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

Top