Skip to content

Instantly share code, notes, and snippets.

@mattm
Created April 6, 2018 17:58
Embed
What would you like to do?
Extracting a JSON value
SELECT
properties,
JSON_EXTRACT_SCALAR(properties, "$.com_id") AS com_id
FROM mp.event
WHERE name = "Signed Up"
LIMIT 1
+-----------------+--------+
| properties | com_id |
+-----------------+--------+
| {"com_id":1234} | 1234 |
+-----------------+--------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment