Debian Codegraph @

test/command/suite/select/function/number/number_classify/int32.test

raw
1 plugin_register functions/number
2
3 table_create Prices TABLE_PAT_KEY Int32
4
5 load --table Prices
6 [
7 {"_key": -201},
8 {"_key": -200},
9 {"_key": -199},
10 {"_key": -101},
11 {"_key": -100},
12 {"_key": -99},
13 {"_key": -1},
14 {"_key": 0},
15 {"_key": 1},
16 {"_key": 99},
17 {"_key": 100},
18 {"_key": 101},
19 {"_key": 199},
20 {"_key": 200},
21 {"_key": 201}
22 ]
23
24 select Prices \
25 --sortby _id \
26 --limit -1 \
27 --output_columns '_key, number_classify(_key, 100)'