Debian Codegraph @

test/command/suite/select/columns/window_function/window_sum/ascending.test

raw
1 table_create Items TABLE_HASH_KEY ShortText
2 column_create Items price COLUMN_SCALAR UInt32
3
4 load --table Items
5 [
6 {"_key": "item1", "price": 666},
7 {"_key": "item2", "price": 999},
8 {"_key": "item3", "price": 777},
9 {"_key": "item4", "price": 111},
10 {"_key": "item5", "price": 333},
11 {"_key": "item6", "price": 222}
12 ]
13
14 select Items \
15 --columns[sum].stage initial \
16 --columns[sum].value 'window_sum(price)' \
17 --columns[sum].type UInt32 \
18 --columns[sum].window.sort_keys price \
19 --output_columns '_key, price, sum' \
20 --sort_keys price