I'm having problems with costing!
I have 2 tables involved
1: dates and quantity sold
2: dates, price paid and quantity bought

So, I need to use FIFO (first in first out) to calculate the cost of the products on the 15 and last day of the month...

Anyone has already done it?? I cant figure in my head how would I do it!
It should be good that the user chooses the type of costing and then a Query would calculate it...
but how??

the FIFO would be:
I bought:
10 itens at $10 on 1/1/04
20 itens at $15 on 1/2/04
30 itens at $20 on 1/3/04

So, if I sell 35 itens my cost using FIFO would be:
(10x10 + 20x15 + 5x20)/35

Using LIFO (Last in First Out)
(30x20 + 5x15)/35

And using the mean is what you told:
(10x10 + 20x15 + 30x20)/60

Anyone can figure a way by Queries for me to do it???

I can't!!!!!!!! PLEASE!