> (select LISTAGG(to_char(b.depot_id),',') WITHIN GROUP(ORDER BY
> b.depot_id) from wms_owner_depot b where b.owner_id=o.OWNER_ID)
例子:
SELECT DISTINCT
o.owner_id,
(select region_name from SYS_region where region_id=o.city) city,
o.source,(select LISTAGG(to_char(b.depot_id),‘,’) WITHIN GROUP(ORDER BY b.depot_id) from wms_owner_depot b where
b.owner_id=o.OWNER_ID)as idss
FROM
wms_owner o
JOIN WMS_OWNER_DEPOT od ON od.OWNER_ID = o.OWNER_ID
${params.dataScope}