Untitled
Anonymous
mysql
12/07/2023 8:07 PM
700 B
22
Indexable
SELECT
COUNT(i.serialnumber) qty,
i.size,
i.product,
p.name,
p.wholesalecost AS priceperunit,
FORMAT(SUM(p.wholesalecost), 'c') RoundedCost
FROM
(SELECT
serialnumber, product, size
FROM
inventoryitem
WHERE
(location LIKE 'APOPStore-RackMoore%'
OR location LIKE 'APOPStore-FRONTPalletMoore%'
OR location LIKE 'APOPStore-BACKPalletMoor%')
AND qtyonhand = 1) i
JOIN
product p ON p.code = i.product
GROUP BY i.productEditor is loading...
Leave a Comment