Skip to content

Instantly share code, notes, and snippets.

@trhaynes
Created December 17, 2010 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trhaynes/745508 to your computer and use it in GitHub Desktop.
Save trhaynes/745508 to your computer and use it in GitHub Desktop.
Grabs all the start/active/shutdown/inactive events for the timeframe
sqlite> SELECT survey.user_id, q5, q6, event_code, timestamp FROM survey, events WHERE survey.user_id == events.user_id AND (event_code == 1 OR event_code == 2 OR event_code == 4 OR event_code == 5) AND timestamp/1000 >= CAST(strftime("%s", "2010-11-03 00:00:00") as INTEGER) AND timestamp/1000 < CAST(strftime("%s", "2010-11-10 00:00:00") as INTEGER);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment