题解 | #国庆期间近7日日均取消订单量#
国庆期间近7日日均取消订单量
https://www.nowcoder.com/practice/2b330aa6cc994ec2a988704a078a0703
select '2021-10-01' as dt , round(count(start_time)/7,2), round((count(*)-count(start_time))/7,2) from tb_get_car_order where date(order_time) between '2021-09-25' and '2021-10-01' union select '2021-10-02' as dt , round(count(start_time)/7,2), round((count(*)-count(start_time))/7,2) from tb_get_car_order where date(order_time) between '2021-09-26' and '2021-10-02' union select '2021-10-03' as dt , round(count(start_time)/7,2), round((count(*)-count(start_time))/7,2) from tb_get_car_order where date(order_time) between '2021-09-27' and '2021-10-03'

查看3道真题和解析