SELECT staff_name, LTRIM(MAX(SYS_CONNECT_BY_PATH("number", '//')), '//') "number"
FROM (SELECT "number", staff_name, ROW_NUMBER() OVER(PARTITION BY staff_name ORDER BY "number" DESC) RN
FROM temp_a)
START WITH RN = 1
CONNECT BY RN - 1 = PRIOR RN
AND staff_name = PRIOR staff_name
GROUP BY staff_name;
STAFF_NAME number
---------- -------------------------------------------------------------------
李四 556//324//123
张三 908//876//289//145