SQL Пример ...
SELECT
ID AS HID,
JSON_ARRAYAGG(
JSON_OBJECT('sequence': TRIM(SEQUENCE),
'payer_reference_qualifier': TRIM(PAYREFQUAL),
'payer_reference_id': TRIM(PAYREFID),
'transaction_processing_status': TRIM(TRNPRCST)
)) AS H1
FROM XXXXX
WHERE ID = 7146
GROUP BY MSGHSTID;
Полученные данные: Я хочу получить только одну строку вместо двух строк. Есть идеи?
[
{"sequence":"1","payer_reference_qualifier":"04","payer_reference_id":"EPIDETPMT0000000001","transaction_processing_status":"E"},
{"sequence":"1","payer_reference_qualifier":"04","payer_reference_id":"EPIDETPMT0000000001","transaction_processing_status":"E"}
]