select *,sum(product_retail) revenue,sum(product_cost) gross_profit,
round((sum(`product_retail`)-sum(`product_cost`))/sum(`product_retail`) * 100, 2) gross_profit_percent
from `combine_product` cp
left join `order_product` op on cp.product_id = op.product_id
where cp.is_parent = 1 group by op.product_id