1 2 3 4 | SELECT STRFTIME('%H', DATETIME(time, 'unixepoch', 'localtime')), COUNT(anotherField) FROM log GROUP BY STRFTIME('%H', DATETIME(time, 'unixepoch', 'localtime')); |
Note: I haven’t worked with SQLite. However, it supports GROUP BY
and hence, this should work.