Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 create temporary table table20 as (select idMeasurement,idPath,timestamp_ns div 1000000000 as time from Measurements where idPath in (select idPath from Paths w here idTraceDirection=12)); | |
2 | |
3 select count(idPath) from Paths where idTraceDirection=20; | |
4 | |
5 | |
6 | |
7 | |
8 ALTER TABLE `table20` ADD COLUMN `id` INT AUTO_INCREMENT UNIQUE FIRST; | |
9 use test;· | |
10 create table Table20 ( id int auto_increment, idMeasurement int, idPath int, tim e bigint(20), PRIMARY KEY (id)); | |
11 use wan; | |
12 | |
13 INSERT INTO test.Table20 select * from wan.table12; | |
14 use test; | |
15 | |
16 | |
17 create table t20 as select e1.id, e1.idPath, e1.idPath src, e2.idPath dst, e1.ti me from_time, e2.time to_time, (e2.time -e1.time) as duration from Table12 e1 IN NER JOIN Table12 e2 on e2.id =e1.id +1; | |
18 | |
OLD | NEW |