I\'m having a table with 3 columns:
DATE_A
, DATE_B
and ISSUE
DATE_A
and DATE_B
can be filled in 3 possible ways:
If I understand correctly, you want a union all
of the date values and string aggregation. listagg()
was introduced in 11g, but you can use wm_concat()
:
select dte, wm_concat(issue) as issues
from ((select date_a as dte, issue from t where date_a is not null) union all
(select date_b, issue from t where date_b is not null)
) di
group by dte
order by dte;