Consulta de información


ESTADÍSTICAS - CRUCE DE VARIABLES

Tipo fecha: Entrevista Registro       Fecha inicial de registro:       Fecha final de registro:
PREGUNTA PARA FILAS
Módulo
Proceso
Capítulo
Pregunta
PREGUNTA PARA COLUMNAS
Módulo
Proceso
Capítulo
Pregunta





SELECT res.resp_p1, count(case when res.resp_p2 = '0' THEN 1 END) AS '1. 0', count(case when res.resp_p2 = '1' THEN 1 END) AS '2. 1', count(case when res.resp_p2 = '2' THEN 1 END) AS '3. 2', count(case when res.resp_p2 = '8' THEN 1 END) AS '4. 8' , t21.sexo FROM ( SELECT t1.*, t2.p1, t2.resp_p1, t3.p2, t3.resp_p2 FROM ( SELECT DISTINCT t11.id_incidente FROM data_preguntas1 AS t11 LEFT JOIN data_id AS t12 ON t11.id_incidente = t12.id_incidente LEFT JOIN ( SELECT id_incidente, id_pregunta, preg_fecha FROM data_preguntas1 WHERE id_pregunta='p_0016' ) AS t111 ON t111.id_incidente = t11.id_incidente WHERE ( t11.id_pregunta = 'p_0022' or t11.id_pregunta = 'p_0023' ) AND t12.login_usuario <> 'prueba' AND true AND t111.preg_fecha <= '2022-09-13' AND t111.id_pregunta = 'p_0016' ) AS t1 LEFT JOIN ( SELECT t13.id_incidente AS id_p1, t13.id_pregunta AS p1, t13.preg_num1 AS resp_p1 FROM data_preguntas1 AS t13 LEFT JOIN data_id AS t14 ON t13.id_incidente = t14.id_incidente WHERE t13.id_pregunta = 'p_0022' AND t14.login_usuario <> 'prueba' AND true AND t13.preg_fecha >= '2022-01-01' AND t13.preg_fecha <= '2022-09-13' AND t13.id_pregunta = 'p_0016' ) AS t2 on t1.id_incidente = t2.id_p1 LEFT JOIN ( SELECT t15.id_incidente AS id_p2, t15.id_pregunta AS p2, t15.preg_num1 AS resp_p2 FROM data_preguntas1 AS t15 LEFT JOIN data_id AS t16 ON t15.id_incidente = t16.id_incidente WHERE t15.id_pregunta = 'p_0023' AND t16.login_usuario <> 'prueba' AND true AND t15.preg_fecha >= '2022-01-01' AND t15.preg_fecha <= '2022-09-13' AND t15.id_pregunta = 'p_0016' ) AS t3 on t1.id_incidente = t3.id_p2 ) AS res LEFT JOIN cat_sexo AS t21 ON res.resp_p1 = t21.id_sexo GROUP BY res.resp_p1