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

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

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

我的笨办法:用union all 实现

select driver_id,round(avg(grade),1)as avg_grade

from tb_get_car_order

where driver_id in

(select driver_id

from tb_get_car_order

where month (order_time)=10

and start_time is null)

and grade is not null

group by 1

union all

select "总体" as driver_id,round(avg(grade),1)as avg_grade

from tb_get_car_order

where driver_id in

(select driver_id

from tb_get_car_order

where month (order_time)=10

and start_time is null)

and grade is not null;

全部评论

相关推荐

但听说转正率很低,我现在有在实习了,好纠结要不要去
熬夜脱发码农:转正率低归低,但是实习的经历你可以拿着,又不是说秋招不准备了
点赞 评论 收藏
分享
后来123321:别着急,我学院本大二,投了1100份,两个面试,其中一个还是我去线下招聘会投的简历,有时候这东西也得看运气
无实习如何秋招上岸
点赞 评论 收藏
分享
每晚夜里独自颤抖:你cet6就cet6,cet4就cet4,你写个cet证书等是什么意思。专业技能快赶上项目行数,你做的这2个项目哪里能提现你有这么多技能呢
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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