1. Exemple
Calculez la distance suivante sous le même horodatage
Distance de suivi de 4 voitures = 94,84-72,48
2. démo
update cacc_log e,(select timestamp,x from
(
select timestamp,sum(x) as x from
(
select timestamp,x from cacc_log where carid ='5' and rwmc ='CACC01'
union all
select timestamp,x*(-1) from cacc_log where carid ='4' and rwmc ='CACC01'
)
as c group by timestamp
) as d ) f
set e.flowdist = f.x
where e.timestamp = f.timestamp and carid ='4' and rwmc ='CACC01';