SELECT a.exp_type, ROUND(AVG(TIMESTAMPDIFF(SECOND,b.out_time,b.in_time) / 3600),1) AS time FROM express_tb AS a INNER JOIN exp_action_tb AS b ON a.exp_number = b.exp_number GROUP BY a.exp_type ORDER BY time;