--1.wm_concat(r.recipe_no), 在oracle 12c中不支持
--2.listagg(fxwt,',') within GROUP (order by fxwt) as fxwt , 数据过长不支持
--3.xmlagg(xmlparse(content fxwt||',' wellformed) order by fxwt).getclobval() as fxwt
select id,小明,wm_concat(子表.做什么的字段) from 主表
lfet join 子表 on 关系=关系
SELECT
q.question_no,
listagg(r.recipe_no, ',') within group(ORDER BY r.register_flow) AS recipe_no,
listagg(r.pay_status, ',') within group(ORDER BY r.register_flow) AS pay_status
--xmlagg(xmlparse(content r.recipe_no||',' wellformed) order by r.register_flow).getclobval() as recipe_no
FROM
out_question q
left join
(select r.register_flow, r.recipe_no,concat(concat(r.recipe_no,','),r.pay_status_id) as pay_status from out_recipe r ) r
on q.register_flow=r.register_flow
where q.register_flow='3ee0bba1424a44158a96114eff838ba7'
group by q.question_no