Sunday 15 February 2015

sqlite3 - SQLITE group by -


I use the group in SQLite from time interval in SQLite. The first day is the group and the second group has an hour:

  select striptime ('% Y-% m-% dT% 00: 00: 00.000', date_time), line, calculation (( Count by 'Sprime' ('% Y-% m-% dT% H: 00: 00.000', date_time) from the line, entry group '% Y-% m-% dT% H: 00: 00.000', date_time) () ())  

How do I group with a 10 minute interval

  select ... strftime ('% y% m% d% H0', date_time) from entry group + stroke ('% M', date_time) / 10;  

No comments:

Post a Comment