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

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

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

# tb1:找到有取消过订单的司机id列表
select ifnull(driver_id,'总体') as driver_id,round(avg(grade),1) as avg_grade
from tb_get_car_order
where driver_id in (select distinct driver_id from tb_get_car_order where start_time is null AND year(order_time) = 2021 AND month(order_time) = 10) #有取消记录的司机
AND grade is not null 
group by driver_id with rollup

全部评论

相关推荐

06-27 18:45
中山大学 Ruby
25届应届毕业生,来广州2个礼拜了,找不到工作,绝望了,太难过了…
应届想染班味:9爷找不到工作只能说明,太摆了或者太挑了。
点赞 评论 收藏
分享
有担当的灰太狼又在摸...:零帧起手查看图片
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务