skip to Main Content

How do I search within a PostgreSQL jsonb array?

I have a jsonb column that looks like this: { "customer_id": "1", "address": "123 Main St.", "orders": [{ "order_id": "1", "catogory": "tools", "item_num": "15", "tracking_num": "GDR9F654F" },{ "order_id": "2", "catogory": "accessories", "item_num": "28", "tracking_num": "PHW3X543T" }] } The "orders" key…

VIEW QUESTION

Postgresql – Duckdb sql and postgres results differ when using unnest

I have a table in postgres and basically i'm trying to duplicate rows based on the delimiter @ in the description column. Here is my table: txn_id description 3332654 [email protected]@0.9397@$10.64@[email protected]@23.8235@$6.30@KRW@36,[email protected]@$41.84@[email protected]@1.5711@$12.73@[email protected]@0.6013@$8.32@[email protected]@10.6013@$18.32 3332655 [email protected]@0.8197@$11.64@[email protected]@21.8135@$61.30@KRW@36,[email protected]@$411.84@[email protected]@11.5711@$11.73 Using the below postgresql code, the rows are…

VIEW QUESTION
Back To Top
Search