Inventory valuation using fifo method
Dear all,
i have some sample data about inventory, i want to sql query. sample data in following manner.
Date Transactions Units Sold Unit Cost Value(Fifo) Inventory Units
May 1 Beginning Inventory 700 $10 700 700
May 3 Purchase 100 $12 1200 800
May 8 Sale (*1) (500) 0 ?? 300
May 15 Purchase 600 $14 8400 900
May 19 Purchase 200 $15 3000 1,100
May 25 Sale (*2) (400) 0 ?? 700
May 27 Sale (*3) (100) 0 ?? 600
May 31 Ending Inventory 0 ??
where the ?? i want to calculate sale quantity value using FIFO method. if there are any idea so please give the reply .
thanks