require ("conexionEstadisticas.php");
$sql2018="select count(a.cveentsol) as dato,
(case c.cveentcat
when 1 then 'Poder Ejecutivo'
when 2 then 'Organismos Autónomos'
when 3 then 'Ayuntamientos'
when 4 then 'Poder Legislativo'
when 5 then 'Poder Judicial'
when 7 then 'Partidos Políticos'
when 8 then 'Sindicatos'
when 9 then 'Fideicomisos'
when 10 then 'Personas Jurídicas Colectivas'
else 'no' end ) as nombre,
(select count(a1.cveentsol) from tblentsol a1,tblentrr c1, tblsujobl b1 where a1.cvesujobl=b1.cvesujobl and a1.cveentsol=c1.cveentsol and b1.cveentcat=c.CveEntCat and a1.TpoEntSol =1 and c1.FolEntRR like '%/2018') as ip,
(select count(a2.cveentsol) from tblentsol a2,tblentrr c2, tblsujobl b2 where a2.cvesujobl=b2.cvesujobl and a2.cveentsol=c2.cveentsol and b2.cveentcat=c.CveEntCat and a2.TpoEntSol =2 and c2.FolEntRR like '%/2018') as ad,
(select count(a3.cveentsol) from tblentsol a3,tblentrr c3, tblsujobl b3 where a3.cvesujobl=b3.cvesujobl and a3.cveentsol=c3.cveentsol and b3.cveentcat=c.CveEntCat and a3.TpoEntSol =3 and c3.FolEntRR like '%/2018') as rd,
(select count(a4.cveentsol) from tblentsol a4,tblentrr c4, tblsujobl b4 where a4.cvesujobl=b4.cvesujobl and a4.cveentsol=c4.cveentsol and b4.cveentcat=c.CveEntCat and a4.TpoEntSol =4 and c4.FolEntRR like '%/2018') as cd,
(select count(a5.cveentsol) from tblentsol a5,tblentrr c5, tblsujobl b5 where a5.cvesujobl=b5.cvesujobl and a5.cveentsol=c5.cveentsol and b5.cveentcat=c.CveEntCat and a5.TpoEntSol =5 and c5.FolEntRR like '%/2018') as od,
c.CveEntCat
from tblentrr a right join tblsujobl b on (a.cvesujobl = b.cvesujobl and a.FolEntRR 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