SyntaxFix
Write A Post
Hire A Developer
Questions
I'm not sure exactly what you want, but I think it's along the lines of:
SELECT `Item`, `qty`-`BAL_QTY` as `qty` FROM ((SELECT Item, SUM(`QTY`) as qty FROM `master_table` GROUP BY `ITEM`) as A NATURAL JOIN `stock_table`) as B