📅  最后修改于: 2022-03-11 15:02:20.440000             🧑  作者: Mango
SELECT
o_id,
CONCAT(
'{',
GROUP_CONCAT(
CONCAT(
'"',
`attribute`,
'":"',
`value`,
'"'
)
),
'}'
) json
FROM t3
GROUP BY o_id