I stuck with bellow code I don't know where is the problem SELECT s.code,sum(qty) as stock FROM Salelg S INNER JOIN brand D ON S.CODE=D.CODE WHERE D.BRAND='adidas' and s.outlet=’delhi' GROUP BY s.CODE HAVING SUM(s.QTY)>0 . when I execute this query it shows 71 individual records with each one stock total 71 stock. now I changed the code like SELECT sum(s.qty) as stock FROM Salelg S INNER JOIN brand D ON S.CODE=D.CODE WHERE D.BRAND='adidas' and s.outlet=’delhi' but it shows only 69 stock please tell me where is the mistake
Aucun commentaire:
Enregistrer un commentaire