题解|晕晕 #有取消订单记录的司机平均评分#
有取消订单记录的司机平均评分
https://www.nowcoder.com/practice/f022c9ec81044d4bb7e0711ab794531a
# SELECT DISTINCT driver_id # FROM tb_get_car_order # WHERE start_time IS NULL (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 start_time IS NULL ) GROUP BY driver_id ORDER BY driver_id) UNION (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 start_time IS NULL )) 怎么就过啦?哈哈哈哈哈哈