select t.order_time, round(sum(if(tb_get_car_order.start_time is null,0,1))/7,2)as finish_num_7d, round(sum(if(tb_get_car_order.start_time is null,1,0))/7,2) as cancel_num_7d from (select date(order_time) as order_time, count(start_time) as finishi_cnt, sum(if(start_time is null,1,0)) as unfinishi_cnt from tb_get_car_order group by date(order_time)) as t left outer join tb_get_car_order on datediff(t.order_time,date(tb_get_car_order.order_time)) BETWEEN 0 and 6 where t.order_time BETWEEN '2021-10-01' and '2021-10-03' group by t.order_time;
点赞

相关推荐

神哥了不得:你简历字体有点不太协调呀,下面的字实在太小了呀,而且项目也不太行,建议换几个高质量的项目,面试会多很多
点赞 评论 收藏
分享
牛客网
牛客企业服务