Skip to content

Instantly share code, notes, and snippets.

@ivorpad
Last active October 16, 2020 11:43
Show Gist options
  • Select an option

  • Save ivorpad/b6a8c44c4f7d2609d53a9a6e1fbc9faa to your computer and use it in GitHub Desktop.

Select an option

Save ivorpad/b6a8c44c4f7d2609d53a9a6e1fbc9faa to your computer and use it in GitHub Desktop.
jsonb_path_query @ PostgreSQL 12
SELECT
jsonb_path_query(tracker_events::jsonb, '$.result[*] ? (@.status == "delivered").tracking_details') as events
FROM orders WHERE store_host='store-name.myshopify.com';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment