select cast(round(avg(abs(timestampdiff(second,o.logtime,s.logtime))),0) as signed) gap
from order_log o
inner join select_log s
using(order_id);
round没办法消除小数位的浮点数,我觉得还是要先四舍五入所以还是加了round,最后套上cast去除浮点数