Related questions
Chaining JSON_EXTRACT with CAST or STR_TO_DATE fails
I'm trying to extract a datetime from a JSONFIELD "data" in MySQL.
If I do a simple JSON_EXTRACT however, the return field type is a JSON.
mysql> select JSON_EXTRACT(data, "$.new_time") from analytics limit 10;
+----------------------------------+
| JSON_…
Getting Values From Json Data Inside Array in Mysql
We are saving information in a json Column which contain json data in an array.
Data structure:
[
{
"type":"automated_backfill",
"title":"Walgreens Sales Ad",
"keyword":"Walgreens Sales Ad",
"score":4
},
{
"type":"automated_backfill",
"title":"Nicoderm Coupons",
"keyword":"Nicoderm Coupons",
"score":4
},
{
"type":"…
MySQL JSON_OBJECT instead of GROUP_CONCAT
I have the following sql query that works fine using GROUP_CONCAT:
SELECT orders.created_at,products.title, o_p.qty AS qty,
(SELECT GROUP_CONCAT(features.title,"\:", o_p_f.value, features.unit) FROM order_product_features AS o_…