select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status,
level,
TASK_NAME as title,
'icon-tree-folder' as icon,
id as value,
TASK_NAME as tooltip,
null as link
from EBA_UT_CHART_TASKS
start with PARENT_TASK is null
connect by prior PROJECT = PARENT_TASK
order siblings by TASK_NAME