suleymanyaldiz adlı üyeden alıntı: mesajı görüntüle
select coalesce(c.category_name, 'other') cat_name , sum(op.quantity) total_order_qty
from oc_order_product op
left join oc_product_to_category pc on op.product_id = pc.product_id
left join oc_category c on pc.category_id = c.category_id
group by c.category_name
Teşekkürler hocam