sql - Total Quantity for each product query -
i have table product following attributes:
productcode(pk) proddescription price stocklevel another table prodline following attributes:
ordernumber(fk) prodcode(fk) quantity now each product want list out product_code, stock_level , total quantity ordered. how can performed?
select a.productcode, a.stocklevel, sum(a.quantity) product inner join prodline b on a.productcode=b.prodcode group a.productcode
Comments
Post a Comment