with
t1 as(
select
convert(avg(abs(timestampdiff(second,ol.logtime,sl.logtime))),unsigned)
from
order_log as ol left join select_log as sl using(order_id)
)
select * from t1

with
t1 as(
select
convert(avg(abs(timestampdiff(second,ol.logtime,sl.logtime))),unsigned)
from
order_log as ol left join select_log as sl using(order_id)
)
select * from t1