题解 | 统计快递运输时长
统计快递运输时长
https://www.nowcoder.com/practice/bb4196936f15424dbabe76a501186d91
#将表关联,并求出每单的运输时间(小时为单位) with t1 as( select exp_type, time_to_sec(timediff(in_time,out_time))/3600 time from exp_action_tb ex left join express_tb e on ex.exp_number = e.exp_number ) select exp_type, round(sum(time)/count(1),1) time from t1 group by exp_type order by time
查看20道真题和解析