SELECT sum(`quantity`) as 'Total Product Sales',product.i_name as 'Product Name'
FROM `order_details`
inner join orders on orders.order_id = order_details.order_id and orders.status like 'C'
inner join product on product.p_id = order_details.product_id
group by order_details.product_id
1条答案
按热度按时间fkvaft9z1#
您可以尝试此codeigniter活动查询:
查询:
我希望这会有帮助。