Debian Codegraph @

test/command/suite/select/drilldowns/no_keys/sum.test

raw
1 table_create Tags TABLE_PAT_KEY ShortText
2
3 table_create Memos TABLE_HASH_KEY ShortText
4 column_create Memos tag COLUMN_SCALAR Tags
5
6 load --table Memos
7 [
8 {"_key": "Groonga is fast!", "tag": "Groonga"},
9 {"_key": "Mroonga is fast!", "tag": "Mroonga"},
10 {"_key": "Groonga sticker!", "tag": "Groonga"},
11 {"_key": "Rroonga is fast!", "tag": "Rroonga"}
12 ]
13
14 select Memos \
15 --drilldowns[tag].keys tag \
16 --drilldowns[tag_sum].table tag \
17 --drilldowns[tag_sum].calc_types SUM \
18 --drilldowns[tag_sum].calc_target _nsubrecs \
19 --drilldowns[tag_sum].output_columns _key,_sum