Sum Query

  • Thread starter Thread starter Greg Ripper
  • Start date Start date
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
 
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
 
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
 
Back
Top