| 1 |
table_create Products TABLE_PAT_KEY ShortText |
| 2 |
|
| 3 |
table_create Purchases TABLE_NO_KEY |
| 4 |
column_create Purchases product COLUMN_SCALAR Products |
| 5 |
column_create Purchases tag COLUMN_SCALAR ShortText |
| 6 |
|
| 7 |
column_create Products purchases COLUMN_INDEX Purchases product |
| 8 |
|
| 9 |
load --table Products |
| 10 |
[ |
| 11 |
{"_key": "apple"}, |
| 12 |
{"_key": "banana"}, |
| 13 |
{"_key": "cacao"} |
| 14 |
] |
| 15 |
|
| 16 |
load --table Purchases |
| 17 |
[ |
| 18 |
{"product": "apple", "tag": "man"}, |
| 19 |
{"product": "banana", "tag": "man"}, |
| 20 |
{"product": "cacao", "tag": "woman"}, |
| 21 |
{"product": "apple", "tag": "many"} |
| 22 |
] |
| 23 |
|
| 24 |
select Products \ |
| 25 |
--output_columns _key,purchases.tag |