Números profesores distintos aptos entre 1 octubre 2009 y 30 septiembre 2010
SELECT s.idsolicitante,count(so.idsolicitud) as cuenta, es.oldestado as aptitud FROM edicion_solicitud es INNER join solicitud so ON es.idsolicitud = so.idsolicitud INNER join solicitante s ON s.idsolicitante = so.idsolicitante INNER join edicion ed ON ed.idedicion = es.idedicion INNER join curso_oferta co ON co.idcursooferta = so.idcursooferta INNER join curso cu ON cu.idcurso = co.idcurso LEFT join centro_trabajo ct ON s.idcentrotrabajo = ct.idcentrotrabajo WHERE inicio_inscripcion > '2007/9/01' AND fin_inscripcion < '2008/09/1' AND es.oldestado='APTO' GROUP BY es.oldestado, s.idsolicitante ORDER BY es.oldestado
select encuesta.id_encuesta, edicion.idcursooferta, edicion.idedicion, curso.nombre, pregunta_encuesta.`texto`, opcion_pregunta.`opcion`, respuesta_encuesta.respuesta from encuesta inner join edicion on `idedicion` = `id_objeto_padre` inner join curso_oferta on edicion.idcursooferta = curso_oferta.idcursooferta inner join curso on curso_oferta.idcurso = curso.idcurso inner join respuesta_encuesta on respuesta_encuesta.id_encuesta = encuesta.`id_encuesta` inner join pregunta_encuesta on pregunta_encuesta.`id_pregunta_encuesta` = respuesta_encuesta.`id_pregunta_encuesta` inner join opcion_pregunta on opcion_pregunta.`id_opcion_pregunta` = respuesta_encuesta.`respuesta`
where pregunta_encuesta.id_pregunta_encuesta in (6,7,8,9,10,11,12,13,14,17)
select curso.idcurso, curso.nombre, pregunta_encuesta.`texto`, round(avg(respuesta_encuesta.respuesta),2) from encuesta inner join edicion on `idedicion` = `id_objeto_padre` inner join curso_oferta on edicion.idcursooferta = curso_oferta.idcursooferta inner join curso on curso_oferta.idcurso = curso.idcurso inner join respuesta_encuesta on respuesta_encuesta.id_encuesta = encuesta.`id_encuesta` inner join pregunta_encuesta on pregunta_encuesta.`id_pregunta_encuesta` = respuesta_encuesta.`id_pregunta_encuesta` inner join opcion_pregunta on opcion_pregunta.`id_opcion_pregunta` = respuesta_encuesta.`respuesta`
where pregunta_encuesta.id_pregunta_encuesta in (6,7,8,9,10,11,12,13,14,17,18,19,20,21,22,23,24) group by curso.idcurso, curso.nombre, pregunta_encuesta.texto order by curso.nombre, pregunta_encuesta.`id_pregunta_encuesta`
select pregunta_encuesta.`texto`, opcion_pregunta.opcion,count(encuesta.`id_encuesta`) from encuesta inner join edicion on `idedicion` = `id_objeto_padre` inner join curso_oferta on edicion.idcursooferta = curso_oferta.idcursooferta inner join curso on curso_oferta.idcurso = curso.idcurso inner join respuesta_encuesta on respuesta_encuesta.id_encuesta = encuesta.`id_encuesta` inner join pregunta_encuesta on pregunta_encuesta.`id_pregunta_encuesta` = respuesta_encuesta.`id_pregunta_encuesta` inner join opcion_pregunta on opcion_pregunta.`id_opcion_pregunta` = respuesta_encuesta.`respuesta`
where pregunta_encuesta.id_pregunta_encuesta in (1,2,3,4,5,15,16) group by pregunta_encuesta.texto, opcion_pregunta.opcion order by pregunta_encuesta.`id_pregunta_encuesta`,opcion_pregunta.opcion
select `formador`.`nombre`, pregunta_encuesta.`texto`, round(avg(respuesta_encuesta.respuesta),2)
from encuesta
inner join respuesta_encuesta on respuesta_encuesta.id_encuesta = encuesta.`id_encuesta`
inner join formador on formador.idformador = respuesta_encuesta.`id_objeto_hijo`
inner join pregunta_encuesta on pregunta_encuesta.`id_pregunta_encuesta` = respuesta_encuesta.`id_pregunta_encuesta`
where pregunta_encuesta.id_pregunta_encuesta in (18,19,20,21,22,23,24)
group by `formador`.`nombre`,pregunta_encuesta.id_pregunta_encuesta, pregunta_encuesta.texto
order by `formador`.`nombre`, pregunta_encuesta.`id_pregunta_encuesta`