test/command/suite/select/function/time/time_classify_second/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 22:33:09.999999"}, |
| 8 | {"_key": "2016-05-05 22:33:10.000000"}, |
| 9 | {"_key": "2016-05-05 22:33:10.000001"}, |
| 10 | {"_key": "2016-05-05 22:33:19.999999"}, |
| 11 | {"_key": "2016-05-05 22:33:20.000000"}, |
| 12 | {"_key": "2016-05-05 22:33:20.000001"} |
| 13 | ] |
| 14 | |
| 15 | select Timestamps \ |
| 16 | --sortby _id \ |
| 17 | --limit -1 \ |
| 18 | --output_columns '_key, time_classify_second(_key, 10)' |