Debian Codegraph @

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

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