Wednesday, 7 August 2013

How do I write a query to get monthly inventory data

How do I write a query to get monthly inventory data

I have following table in which i have the inventory of items on different
dates:
Item Date inventory ---- ---- --------- I1 6/25/2013 10 I2 6/25/2013 8 I3
7/01/2013 20 I1 7/02/2013 12 I2 7/03/2013 6 I3 8/02/2013 10
I need to create a view that gives me opening inventory level of each item
of each month. The output I want is as follows:
Item Month inventory ---- ----- --------- I1 7/2013 10 I2 7/2013 8 I3
7/2013 20 I1 8/2013 12 I2 8/2013 6 I3 8/2013 20
Pls help me how i can write a query to achieve this.

No comments:

Post a Comment