| 1 |
table_create Tags TABLE_PAT_KEY ShortText |
| 2 |
[[0,0.0,0.0],true] |
| 3 |
table_create Memos TABLE_HASH_KEY ShortText |
| 4 |
[[0,0.0,0.0],true] |
| 5 |
column_create Memos tag COLUMN_SCALAR Tags |
| 6 |
[[0,0.0,0.0],true] |
| 7 |
load --table Memos |
| 8 |
[ |
| 9 |
{"_key": "Groonga is fast!", "tag": "Groonga"}, |
| 10 |
{"_key": "Mroonga is fast!", "tag": "Mroonga"}, |
| 11 |
{"_key": "Groonga sticker!", "tag": "Groonga"}, |
| 12 |
{"_key": "Rroonga is fast!", "tag": "Rroonga"} |
| 13 |
] |
| 14 |
[[0,0.0,0.0],4] |
| 15 |
select Memos --drilldown[tag].keys tag --drilldown[tag_sum].table tag --drilldown[tag_sum].calc_types SUM --drilldown[tag_sum].calc_target _nsubrecs --drilldown[tag_sum].output_columns _key,_sum |
| 16 |
[ |
| 17 |
[ |
| 18 |
0, |
| 19 |
0.0, |
| 20 |
0.0 |
| 21 |
], |
| 22 |
[ |
| 23 |
[ |
| 24 |
[ |
| 25 |
4 |
| 26 |
], |
| 27 |
[ |
| 28 |
[ |
| 29 |
"_id", |
| 30 |
"UInt32" |
| 31 |
], |
| 32 |
[ |
| 33 |
"_key", |
| 34 |
"ShortText" |
| 35 |
], |
| 36 |
[ |
| 37 |
"tag", |
| 38 |
"Tags" |
| 39 |
] |
| 40 |
], |
| 41 |
[ |
| 42 |
1, |
| 43 |
"Groonga is fast!", |
| 44 |
"Groonga" |
| 45 |
], |
| 46 |
[ |
| 47 |
2, |
| 48 |
"Mroonga is fast!", |
| 49 |
"Mroonga" |
| 50 |
], |
| 51 |
[ |
| 52 |
3, |
| 53 |
"Groonga sticker!", |
| 54 |
"Groonga" |
| 55 |
], |
| 56 |
[ |
| 57 |
4, |
| 58 |
"Rroonga is fast!", |
| 59 |
"Rroonga" |
| 60 |
] |
| 61 |
], |
| 62 |
{ |
| 63 |
"tag": [ |
| 64 |
[ |
| 65 |
3 |
| 66 |
], |
| 67 |
[ |
| 68 |
[ |
| 69 |
"_key", |
| 70 |
"ShortText" |
| 71 |
], |
| 72 |
[ |
| 73 |
"_nsubrecs", |
| 74 |
"Int32" |
| 75 |
] |
| 76 |
], |
| 77 |
[ |
| 78 |
"Groonga", |
| 79 |
2 |
| 80 |
], |
| 81 |
[ |
| 82 |
"Mroonga", |
| 83 |
1 |
| 84 |
], |
| 85 |
[ |
| 86 |
"Rroonga", |
| 87 |
1 |
| 88 |
] |
| 89 |
], |
| 90 |
"tag_sum": [ |
| 91 |
[ |
| 92 |
1 |
| 93 |
], |
| 94 |
[ |
| 95 |
[ |
| 96 |
"_key", |
| 97 |
"ShortText" |
| 98 |
], |
| 99 |
[ |
| 100 |
"_sum", |
| 101 |
"Int64" |
| 102 |
] |
| 103 |
], |
| 104 |
[ |
| 105 |
"_all", |
| 106 |
4 |
| 107 |
] |
| 108 |
] |
| 109 |
} |
| 110 |
] |
| 111 |
] |