0
私は販売アイテムのレポートを表示したい。グループの列の合計と一覧表に表示
製品テーブル
id,name,information,stock,MRP
売上テーブル
id,quantity,sales_price,product_id,sold_quantity.
今私はすべての数量の合計のsold_quantityをhavngすべての詳細を表示したいです。
クエリの実行以下しかしindividually.Iは
SELECT product_id,sum(quantity) as quantity FROM sales GROUP BY product_id;
select product.name,product.information,sales.cost_price,sales.quantity from sales inner join product on sales.product_id=product.id;