changeset 167:ed2de414e5f6

sql to create views
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Fri, 30 Sep 2011 02:04:56 -0400
parents 4eb13ed73d84
children 6ec7f6c61daf
files c/feature-based-tracking.cpp
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/c/feature-based-tracking.cpp	Thu Sep 29 18:49:40 2011 -0400
+++ b/c/feature-based-tracking.cpp	Fri Sep 30 02:04:56 2011 -0400
@@ -262,6 +262,15 @@
       ss << *trajectories[i];
       cout << ss.str() << endl;
     }
+
+    // create views for first and last instants for each trajectory
+    // CREATE  VIEW IF NOT EXISTS trajectory_first_instants AS select trajectory_id, min(frame_number) as first_instant from positions group by trajectory_id
+    // CREATE  VIEW IF NOT EXISTS trajectory_last_instants AS select trajectory_id, max(frame_number) as last_instant from positions group by trajectory_id
+    //select trajectory_id from trajectory_first_instants where first_instant = 49
+
+
+
+
     trajectoryDB->endTransaction();
     trajectoryDB->disconnect();
   }