select round(sum(total_amount)/ count(order_id),1),round(sum(p_2)/ count(order_id),1) from tb_order_overall left join (select order_id,-(total_amount-p_1) p_2 from tb_order_overall left join (select order_id,sum(price) p_1 from tb_order_detail left join tb_order_overall using(order_id) where date_fo...