0
我想顯示銷售項目的報告。列與分組的總和並將其顯示在列表中
產品表
id,name,information,stock,MRP
銷售表
id,quantity,sales_price,product_id,sold_quantity.
現在我想告訴所有的細節havng所有數量的總和的sold_quantity。
下面的查詢運行,但individually.I想在1次像
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;