Item A Current Stock Balance : 50 Latest StockIn Details InvNo ItemNo Qty Cost Date ------------------------------- A01 ItemA 10 10 22/07/2001 - Include A02 ItemA 10 20 21/07/2001 - Include A03 ItemA 10 15 19/07/2001 - Include A04 ItemA 10 10 18/07/2001 - Include A05 ItemA 10 10 10/07/2001 - Include A06 ItemA 10 10 08/07/2001 - Exclude since the total qty exceed 50How to use SQL to get the "included" stock in details for all of the items ??