Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(940)

Unified Diff: task1_2_revised.sql

Issue 334770043: revised one for task1.2
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: task1_2_revised.sql
diff --git a/task1_2_revised.sql b/task1_2_revised.sql
new file mode 100644
index 0000000000000000000000000000000000000000..dd333fd84edbad3105edccf3249e12dc39b716b4
--- /dev/null
+++ b/task1_2_revised.sql
@@ -0,0 +1,18 @@
+create temporary table table20 as (select idMeasurement,idPath,timestamp_ns div 1000000000 as time from Measurements where idPath in (select idPath from Paths where idTraceDirection=12));
+
+select count(idPath) from Paths where idTraceDirection=20;
+
+
+
+
+ ALTER TABLE `table20` ADD COLUMN `id` INT AUTO_INCREMENT UNIQUE FIRST;
+use test;
+create table Table20 ( id int auto_increment, idMeasurement int, idPath int, time bigint(20), PRIMARY KEY (id));
+use wan;
+
+INSERT INTO test.Table20 select * from wan.table12;
+use test;
+
+
+create table t20 as select e1.id, e1.idPath, e1.idPath src, e2.idPath dst, e1.time from_time, e2.time to_time, (e2.time -e1.time) as duration from Table12 e1 INNER JOIN Table12 e2 on e2.id =e1.id +1;
+
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b