At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.
SELECT supplierOrderDetails.productID as productid, supplierOrder.id as supplierorderid, product.brandname as brandname, product.productcode as code, supplierOrderDetails.orderQty as orderQty, supplierOrderDetails.id as sodID, SUM(supplierOrderReceiveDetail.qtyArrived) as qtyArrived , supplierOrderReceiveDetail.batchNo, supplierOrderReceiveDetail.expDate FROM supplierOrder LEFT OUTER JOIN supplierOrderDetails ON ( supplierOrderDetails.supplierOrderID = supplierOrder.ID ) LEFT OUTER JOIN product ON ( product.id = supplierOrderDetails.productID ) LEFT OUTER JOIN supplierOrderReceive ON ( supplierOrderReceive.supplierOrderID = supplierOrder.ID ) LEFT OUTER JOIN supplierOrderReceiveDetail ON ( supplierOrderReceiveDetail.supplierOrderReceiveID = supplierOrderReceive.ID ) AND ( supplierOrderReceiveDetail.ProductID =supplierOrderDetails.ProductID ) WHERE supplierOrder.ID = 1 GROUP BY supplierOrderDetails.productID, supplierOrderDetails.orderQty, product.brandname, product.productcode, supplierOrder.id, supplierOrderDetails.id, supplierOrderReceiveDetail.batchNo, supplierOrderReceiveDetail.expDate
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.