题解 | #有取消订单记录的司机平均评分#

有取消订单记录的司机平均评分

https://www.nowcoder.com/practice/f022c9ec81044d4bb7e0711ab794531a

select ifnull(driver_id,'总体') as driver_id,round(avg(grade),1) as avg_grade
from tb_get_car_record join tb_get_car_order using(order_id)
     where   
     driver_id in (select driver_id from tb_get_car_order 
                   where start_time is null and date(order_time) between '2021-10-1'and '2021-10-31')
     group by driver_id

     with rollup 

时间是对取消订单来说的

全部评论

相关推荐

吃不饱的肱二头肌很想退休:tnnd 我以为选妹子呢,亏我兴高采烈的冲进来😠
投递快手等公司10个岗位
点赞 评论 收藏
分享
2 收藏 评论
分享
牛客网
牛客企业服务