方法一:自己的笨拙办法,利用union连接三个表格,分别是9.25-10.1,9.26-10.2,9.27-10.3 select '2021-10-01' as dt, round(sum(if(mileage>0,1,0))/7,2) as finish_num_7d, round(sum(if(mileage>0,0,1))/7,2) as rcancel_num_7d from tb_get_car_order tco left join tb_get_car_record tcr on tco.order_id=tcr.order_id and tco...