sort, group, sum

D

dkl

Hopefully giving an example of my data and the goal, you can suggest a method.
My example is to cost a product. The data I would like to enter into
tblProduction by using a frmProduction is Date, ProductName, Machine# (1-20),
AmountOfTime.
I have another table called tblMachine that is the lookup for the Machine#.
These machines have 4 different cost rates( say $30/hr, $40/hr, $50/hr,
$60/hr). I would like to categorize these machines with 4
labels/types/groups/or whatever term is appropriate that I can use to group
tblProduction and then sum the amount of time for each Product. These group
sums of time would then be multiplied by the code rate to determine each
product's cost.
How should I set up my query or queries so I can sort, group and then sum to
determine each product's cost? (I think I have a grasp on the sorting and
calculation aspects of a query, but don't know the grouping and sum
components)
 
Top