cte3_persenta (per) as (select ((cte1.totalcount/cte2.TotaCount)* 100 ) where cte1.emp=cte2.emp from cte1,cte2)
select cte1totalcount,cte2totalcount,(cte1totalcount/cte2totalcount)*100 as cet3 from emp_status
select cte1.totalcount,cte2.totalcount ,(cte1.totalcount/cte2.totalcount)*100 as cte3_persent from cte1 join inner cte2 on cte1.emp=cte2.emp
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)