on 07-12-2017 10:54 AM
Based on invoices, I want to know how long the products have been in inventory before sold. Any SQL suggestions for this?
Hi,
Try this query,
SELECT T0.[ItemCode], T0.[Dscription], max(T0.[DocDate]) as 'Last Received Date' FROM OINM T0 WHERE T0.[OutQty] <= 0 GROUP BY T0.[ItemCode], T0.[Dscription] ORDER BY max(T0.[DocDate]) desc
Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.