Вы можете попробовать запрос ниже -
SELECT P.item, P.purchase, IFNULL(S.sale, 0), P.purchase - IFNULL(S.sale, 0) stock
FROM (SELECT item, SUM(qty) purchase
FROM purchase
GROUP BY item) P
LEFT JOIN (SELECT item, SUM(qty) sale
FROM sale
GROUP BY item) S ON P.item = S.item