diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/posts/2024-01-05-mayim-sqlite.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content/posts/2024-01-05-mayim-sqlite.md b/content/posts/2024-01-05-mayim-sqlite.md index a151bfe..d20c1f0 100644 --- a/content/posts/2024-01-05-mayim-sqlite.md +++ b/content/posts/2024-01-05-mayim-sqlite.md @@ -169,7 +169,8 @@ I'm skipping a bit here because categories has only one data field, though I probably should write full objects as for prices. ```sql -SELECT product.id, product.name, json_group_array(category.name) as categories, json_group_array( +SELECT product.id, product.name, json_group_array(category.name) as categories, +json_group_array( json_object('id', price.id, 'price', price, 'unit', unit) ) as prices FROM product |