=================================================
SELECT SUBSTR(MAX (SYS_CONNECT_BY_PATH (SCH_CD, ', ' )), 2 ) SCH_CD
FROM (SELECT SCH_CD,
RNC,
LAG(RNC) OVER(ORDER BY RNC) RNP
FROM (SELECT ROWNUM RNC, SCH_CD
FROM XE_SCHOOL
WHERE SCH_CD LIKE '08%'
)
)
START WITH RNP IS NULL
CONNECT BY RNP = PRIOR RNC
=================================================