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