Fork of Artículos de mujeres creados en marzo de 2019 by Superzerocool
This query is marked as a draft This query has been published by Superzerocool.

SQL

x
 
use eswiki_p;
SELECT date_format(rev_timestamp, '%Y-%m') as mes,
    (SUM(IF(cl_to = 'Mujeres', 1, 0))) mujeres, (SUM(IF(cl_to = 'Hombres', 1, 0))) hombres
FROM revision, page, categorylinks cat
WHERE year(rev_timestamp) >= 2018
    AND rev_parent_id = 0
    AND page_id = rev_page AND page_namespace = 0
    AND cl_from = page_id
    AND cl_to in ('Mujeres', 'Hombres')
    AND NOT EXISTS (SELECT 1 FROM categorylinks cat2 WHERE page_id = cat2.cl_from and cat2.cl_to like 'Futbolista%')
    GROUP BY 1
ORDER BY 1;
use eswiki_p;
SELECT date_format(rev_timestamp, '%Y-%m') as mes,
    (SUM(IF(cl_to = 'Mujeres', 1, 0))) mujeres, (SUM(IF(cl_to = 'Hombres', 1, 0))) hombres
FROM revision, page, categorylinks cat
WHERE year(rev_timestamp) >= 2018
    AND rev_parent_id = 0
    AND page_id = rev_page AND page_namespace = 0
    AND cl_from = page_id
    AND cl_to in ('Mujeres', 'Hombres')
    AND EXISTS (SELECT 1 FROM categorylinks cat2 WHERE page_id = cat2.cl_from and cat2.cl_to like 'Futbolista%')
    GROUP BY 1
ORDER BY 1
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...