我想要将多行合并一行 select a.outpatient_code, b.value from PT_OUTPATIENT_CURE a,RCD_out_RECORD_ITEM b where a.id=b.outpatient_id and a.outpatient_code='685593' and b.element_id='204032'
select a.outpatient_code, listagg(b.value) within group (order by b.value)
from PT_OUTPATIENT_CURE a,RCD_out_RECORD_ITEM b
where a.id=b.outpatient_id
anda.outpatient_code='685593'and b.element_id='204032'
group bya.outpatient_code