Created
April 6, 2018 17:58
-
-
Save mattm/ec0e211d5f8673a7f5b2a9fc48716fc9 to your computer and use it in GitHub Desktop.
Extracting a JSON value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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