require ("conexionEstadisticas.php");
$sql2018="select count(a.cveentsol) as dato,
(case c.orden
when 1 then 'Poder Ejecutivo'
when 2 then 'Poder Legislativo'
when 3 then 'Poder Judicial'
when 4 then 'Ayuntamientos'
when 5 then 'Organismos Autónomos'
when 6 then 'Partidos Políticos'
when 7 then 'Sindicatos'
when 8 then 'Fideicomisos'
when 9 then 'Personas Jurídicas Colectivas'
else 'no' end ) as nombre,
(select count(a1.cveentsol) from tblentsol a1, tblsujobl b1 where a1.cvesujobl=b1.cvesujobl and b1.cveentcat=c.CveEntCat and a1.TpoEntSol =1 and a1.FolEntSol like '%/2018') as ip,
(select count(a2.cveentsol) from tblentsol a2, tblsujobl b2 where a2.cvesujobl=b2.cvesujobl and b2.cveentcat=c.CveEntCat and a2.TpoEntSol =2 and a2.FolEntSol like '%/2018') as ad,
(select count(a3.cveentsol) from tblentsol a3, tblsujobl b3 where a3.cvesujobl=b3.cvesujobl and b3.cveentcat=c.CveEntCat and a3.TpoEntSol =3 and a3.FolEntSol like '%/2018') as rd,
(select count(a4.cveentsol) from tblentsol a4, tblsujobl b4 where a4.cvesujobl=b4.cvesujobl and b4.cveentcat=c.CveEntCat and a4.TpoEntSol =4 and a4.FolEntSol like '%/2018') as cd,
(select count(a5.cveentsol) from tblentsol a5, tblsujobl b5 where a5.cvesujobl=b5.cvesujobl and b5.cveentcat=c.CveEntCat and a5.TpoEntSol =5 and a5.FolEntSol like '%/2018') as od,
c.CveEntCat
from tblentsol a right join tblsujobl b on (a.cvesujobl = b.cvesujobl and a.FolEntSol like '%/2018'), tblentcat c
where b.cveentcat = c.cveentcat
group by c.CveEntCat order by c.orden";
?>
Calle de Pino Suárez sin número, actualmente Carretera Toluca-Ixtapan # 111, Colonia La Michoacana; Metepec Estado de México, C.P. 52166
Calle de Nezahualcoyotl S/N Col. Izcalli IPIEM, Toluca, Estado de México. C. P. 50150
Tel: 01 (722) 226 1980