Skip to content

Instantly share code, notes, and snippets.

@jaydson
Last active June 13, 2021 18:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
--PostgreSQL 13
SELECT *
FROM shirts
WHERE details->'attributes'->>'color' = 'neon yellow'
AND details->'attributes'->>'size' = 'medium';
--PostgreSQL 14
SELECT *
FROM shirts
WHERE details['attributes']['color'] = '"neon yellow"'
AND details['attributes']['size'] = '"medium"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment