Varför inte använda bara sql:
SELECT MAX(ltrim(sys_connect_by_path(flow_run_id, ','), ','))
FROM
(
select flow_run_id, rownum rn
from table
where CREATED_DATE < sysdate - 32
and rownum < 10
order by 1 desc
)
START WITH rn = 1
CONNECT BY PRIOR rn = rn - 1