JSON_OBJECTAGG¶
JSON_OBJECTAGG returns a JSON object where the key:value pairs of the object are an aggregate based on rows of a table.
where the arguments have the same meaning as described in JSON_OBJECT.
Example:
returns the JSON object {"Frank":1,"Steve":2,"Bob":1}.
generates an error because the last name is NULL, which is invalid.
JSON_OBJECTAGG can be used in GROUP BY clauses.
returns: