I am stuck on MySql Query execution! I created one table called 'WO'. From this table, there are 3 columns
- Order QTY (Actual Quantity for the order)
- Receive Qty (Actual Quantity that has been received)
- Pending Qty. (Quantity that will be received)
I can add some of my row results. But my target is, if Order QTY=Receive QTY
, then this row will not be shown during execution. But I failed to capture this part! Need your valuable advice to solve this part.
Below is my code and output in a picture.
SELECT
id,
ind,
WONO,
PRODUCT,
SUM(QTY) as "Order_QTY",
SUM(Rec_QTY) as "Received",
SUM(QTY-Rec_QTY) as "Pending",
UNIT
FROM
wo
WHERE
Inhouse_Status!="IN-HOUSED"
Group by
ind
ORDER BY
ind DESC