# HG changeset patch # User Nicolas Saunier # Date 1317362696 14400 # Node ID ed2de414e5f65f3e12e69715d9fe58d78c6d652e # Parent 4eb13ed73d840e2a6f51fd681a85ac3293116295 sql to create views diff -r 4eb13ed73d84 -r ed2de414e5f6 c/feature-based-tracking.cpp --- 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(); }