Inventory Ageing Query

Keith Clark <[email protected]> Thu, 18 Feb 2010 16:10:08 -0500
Newsgroups gmane.comp.openoffice.dba.user
Message-ID <1266527408.26266.6.camel@HP1211N>
This is more of a general sql query question rather than a direct
question about Base, but here I go anyways.

I have two tables with the following relevant fields that record
inventory transactions.

tblSales
	ItemNo
	Date
	Quantity

tblPurchases
	ItemNo
	Date
	Quantity

Here would be some sample data:

tblSales

ItemNo	Date		Quantity
xyz	01/01/10	1
xyz	01/01/10	1

tblPurchases

ItemNo	Date		Quantity
xyz	1/12/09		1
xyz	2/12/09		2
xyz	3/12/09		1

Now, how do I go about creating an ageing report from these two tables?

Thanks for any hints or references that you may have.

Keith