题解 | 统计快递运输时长
统计快递运输时长
https://www.nowcoder.com/practice/bb4196936f15424dbabe76a501186d91
SELECT t1.exp_type,ROUND(AVG(TIMESTAMPDIFF(second,out_time,in_time)/3600),1) time FROM express_tb t1 RIGHT JOIN exp_action_tb t2 ON t1.exp_number = t2.exp_number GROUP BY t1.exp_type ORDER BY time ASC