select round(avg(total_amount),1) as avg_amount, round(avg(yh_amount),1) as avg_cost -- round(sum(total_amount) / count(t1.order_id), 1) as avg_amount, -- round(sum(yh_amount) / count(t1.order_id), 1) as avg_cost from tb_order_overall t1 left join ( -- 计算每单的优惠金额 select t1.order_id, sum(t2.price * t2...