slow moving items
wonna come up with a query in SBO that displays a list of items that have sold less than for instance 5 pieces for a certain duration, say six months.
Any ideas will be highly appreciated. Thanks.
SELECT T0.ItemCode, T0.Dscription, T2.Onhand, SUM(T0.Quantity) 'QTY Sold' FROM INV1 T0 INNER JOIN OINV T1 ON T1.DocEntry = T0.DocEntry INNER JOIN OITM T2 ON T2.ItemCode = T0.ItemCode and T2.OnHand > 0 WHERE (T1.DocDate BETWEEN '[%0]' AND '[%1]' ) GROUP BY T0.ItemCode, T0.Dscription, T2.Onhand HAVING SUM(T0.Quantity) <= '[%2]'