题解 | #2021年国庆在北京接单3次及以上司机统计信息#
2021年国庆在北京接单3次及以上的司机统计信息
https://www.nowcoder.com/practice/992783fd80f746d49e790d33ee537c19
select '北京' city,round(avg(num_1),3) avg_order_num, round(avg(num_2),3) avg_income from (select driver_id, count(1) num_1, sum(fare) num_2 from tb_get_car_record a left join tb_get_car_order b on a.order_id = b.order_id and a.uid = b.uid where city = '北京' and driver_id is not null and date(event_time) between '2021-10-01' and '2021-10-07' group by driver_id ) u where num_1 >= 3