SELECT
d."DEPTNO" "DEPTNO",
d."DNAME" "DNAME",
d."LOC" "LOC",
(select count(*) from wwv_demo_emp e where e.deptno = d.deptno) employee_count,
round( (select count(*) from wwv_demo_emp e where e.deptno = d.deptno) /
(select count(*) from wwv_demo_emp) * 100 )
percent_of_organization
FROM
"WWV_DEMO_DEPT" d