Query to get the Last Leaf with Path

0

Query to get the Last Leaf with Path:

 

Table Structure and Data:

 



Query To get the Identify last node of a branch with its Path:


select btree.* , sys_connect_by_path(emp,'/') PATH ,connect_by_isleaf  INDICATOR  from btree  start with Manager is null

connect by nocycle prior EMP=MANAGER order by 1;