Data license: CC Attribution 4.0 License · About: ✏️ ronderos.pe

27 rows

View and edit SQL

v2_DEPARTAMENTO hallazgos_perulibre_payaso hallazgos_perulibre_corregido sospechosos_perulibre_payaso sospechosos_perulibre_corregido hallazgos_fp_payaso hallazgos_fp_corregido sospechosos_fp_payaso sospechosos_fp_corregido
AMAZONAS 0 1 0 0 69 23 75 22
AMERICA 0 0 0 0 7 7 10 1
ANCASH 0 0 0 0 57 5 342 25
APURIMAC 0 0 0 0 60 0 247 3
AREQUIPA 0 0 12 12 83 1 736 73
AYACUCHO 1 1 1 1 82 9 377 21
CAJAMARCA 0 0 0 0 168 24 658 31
CALLAO 0 0 4 4 0 0 7 4
CUSCO 0 0 0 0 657 9 1275 24
EUROPA 0 0 0 0 1 1 2 1
HUANCAVELICA 0 1 0 0 72 7 391 1
HUANUCO 0 0 0 0 43 7 262 25
ICA 0 0 0 0 0 0 14 1
JUNIN 0 0 4 4 16 1 51 2
LA LIBERTAD 0 0 1 1 4 1 192 11
LAMBAYEQUE 0 0 1 1 17 0 52 10
LIMA 3 3 6 6 4 3 184 39
LORETO 1 1 2 2 76 60 160 46
MADRE DE DIOS 0 0 0 0 2 0 70 3
MOQUEGUA 0 0 0 0 12 0 38 0
PASCO 0 0 0 0 2 1 37 5
PIURA 2 2 2 2 35 3 250 20
PUNO 1 1 0 0 294 9 1105 19
SAN MARTIN 0 0 0 0 0 0 47 2
TACNA 0 0 0 0 2 1 36 2
TUMBES 0 0 0 0 1 1 7 3
UCAYALI 0 0 0 0 5 1 31 7

Advanced export

JSON shape: default, array, newline-delimited

CSV options:

CREATE VIEW payasada_summary
AS
SELECT v2_DEPARTAMENTO,
       SUM(hallazgos_perulibre_payaso)      AS hallazgos_perulibre_payaso,
       SUM(hallazgos_perulibre_corregido)   AS hallazgos_perulibre_corregido,
       SUM(sospechosos_perulibre_payaso)    AS sospechosos_perulibre_payaso,
       SUM(sospechosos_perulibre_corregido) AS sospechosos_perulibre_corregido,
       SUM(hallazgos_fp_payaso)             AS hallazgos_fp_payaso,
       SUM(hallazgos_fp_corregido)          AS hallazgos_fp_corregido,
       SUM(sospechosos_fp_payaso)           AS sospechosos_fp_payaso,
       SUM(sospechosos_fp_corregido)        AS sospechosos_fp_corregido
FROM (
         SELECT v2_DEPARTAMENTO,
                COUNT(1) AS hallazgos_perulibre_payaso,
                0        AS hallazgos_perulibre_corregido,
                0        AS sospechosos_perulibre_payaso,
                0        AS sospechosos_perulibre_corregido,
                0        AS hallazgos_fp_payaso,
                0        AS hallazgos_fp_corregido,
                0        AS sospechosos_fp_payaso,
                0        AS sospechosos_fp_corregido
         FROM payasada
         WHERE hallazgo_perulibre_payaso
         GROUP BY v2_DEPARTAMENTO
         UNION
         SELECT v2_DEPARTAMENTO,
                0,
                COUNT(1),
                0,
                0,
                0,
                0,
                0,
                0
         FROM payasada
         WHERE hallazgo_perulibre_corregido
         GROUP BY v2_DEPARTAMENTO
         UNION
         SELECT v2_DEPARTAMENTO,
                0,
                0,
                COUNT(1),
                0,
                0,
                0,
                0,
                0
         FROM payasada
         WHERE sospechoso_perulibre_payaso
         GROUP BY v2_DEPARTAMENTO
         UNION
         SELECT v2_DEPARTAMENTO,
                0,
                0,
                0,
                COUNT(1),
                0,
                0,
                0,
                0
         FROM payasada
         WHERE sospechoso_perulibre_corregido
         GROUP BY v2_DEPARTAMENTO
         UNION
         SELECT v2_DEPARTAMENTO,
                0,
                0,
                0,
                0,
                COUNT(1),
                0,
                0,
                0
         FROM payasada
         WHERE hallazgo_fp_payaso
         GROUP BY v2_DEPARTAMENTO
         UNION
         SELECT v2_DEPARTAMENTO,
                0,
                0,
                0,
                0,
                0,
                COUNT(1),
                0,
                0
         FROM payasada
         WHERE hallazgo_fp_corregido
         GROUP BY v2_DEPARTAMENTO
         UNION
         SELECT v2_DEPARTAMENTO,
                0,
                0,
                0,
                0,
                0,
                0,
                COUNT(1),
                0
         FROM payasada
         WHERE sospechoso_fp_payaso
         GROUP BY v2_DEPARTAMENTO
         UNION
         SELECT v2_DEPARTAMENTO,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                COUNT(1)
         FROM payasada
         WHERE sospechoso_fp_corregido
         GROUP BY v2_DEPARTAMENTO
     )
GROUP BY v2_DEPARTAMENTO;