SELECT a.ano AS `AÑO`,s.nom_sed AS `SEDE`,j.des_jor AS `JORNADA`,g.des_gra AS `GRADO`,
p.id_pre AS `CÓDIGO`,p.ape_pre AS `APELLIDOS`,p.nom_pre AS `NOMBRES`,
p.fec_nac AS `FECHA DE NACIMIENTO`,p.documento AS `No. IDENTIFICACIÓN`,
p.fec_ins AS `FECHA DE INSCRIPCIÓN`
FROM preinscrito p
INNER JOIN adm_ingreso ai ON p.id_pre=ai.sis_id_per AND ai.sis_est='v'
INNER JOIN grado g USING(cod_gra)
INNER JOIN tipodocum t USING(cod_tid)
INNER JOIN jornada j USING(id_jor)
INNER JOIN sede s USING(id_sed)
INNER JOIN anolectivo a USING(id_ano)
ORDER BY s.id_sed,j.id_jor,g.ord_gra