mariadb json_arrayagg no existe
SELECT column1, CONCAT('[', GROUP_CONCAT(column2), ']') AS column2 FROM table GROUP BY column1;
Alberto Peripolli
SELECT column1, CONCAT('[', GROUP_CONCAT(column2), ']') AS column2 FROM table GROUP BY column1;