Debian Codegraph @

test/command/suite/select/function/time/time_classify_hour/interval.test

raw
1 plugin_register functions/time
2
3 table_create Timestamps TABLE_PAT_KEY Time
4
5 load --table Timestamps
6 [
7 {"_key": "2016-05-05 11:59:59.999999"},
8 {"_key": "2016-05-05 12:00:00.000000"},
9 {"_key": "2016-05-05 12:00:00.000001"},
10 {"_key": "2016-05-05 13:59:59.999999"},
11 {"_key": "2016-05-05 14:00:00.000000"},
12 {"_key": "2016-05-05 14:00:00.000001"}
13 ]
14
15 select Timestamps \
16 --sortby _id \
17 --limit -1 \
18 --output_columns '_key, time_classify_hour(_key, 2)'