select
case
when count(EMPNO)-1 = 0 then '-'
else '<a href="javascript: void(0)"'||
'class="levelsGetInferiors"><span class="fa fa-sitemap"></span></a>'||
'<span class="EMPNO hidden">'||EMPNO||'</span>'
end as derivied01_fa_sitemap,
EMPNO as "Empno",
ENAME as "Name",
JOB as "Job",
SAL as "Salary",
NVL(COMM, 0) as "Commission",
count(EMPNO)-1 as "Inferiors"
from
emp
where
mgr = '#EMPNO#'
connect by prior
mgr = empno
group by
EMPNO,
ENAME,
JOB,
SAL,
COMM