please provide me sql query for below output sum query please help me
Probably something like this:
SELECT * FROM ( SELECT product_id, SUM(quantity) AS purchase FROM purchase GROUP BY product_id ) P JOIN ( SELECT product_id, SUM(quantity) AS sale FROM sale GROUP BY product_id ) S ON S.product_id = P.product_id
please any one help me
Dear sir please help me, here product id 4 is not entry to sale column but i want to show purchase column result as like below picture. sir please help be as before code. thanks
We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.