Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Tulspal
.
Toggle Highlighting
SQL
SELECT substr(rev_timestamp,4) AS year, up_value AS gender, ROUND(COUNT(CASE WHEN up_value = 'male' THEN 1 END) / NULLIF(COUNT(rev_id), 0), 2) AS male_edits, ROUND(COUNT(CASE WHEN up_value = 'female' THEN 1 END) / NULLIF(COUNT(rev_id), 0), 2) AS female_edits, ROUND(COUNT(CASE WHEN up_value = 'male' THEN 1 END) / NULLIF(COUNT(CASE WHEN up_value = 'female' THEN 1 END), 0), 2) AS male_female_ratio FROM revision LEFT JOIN user_properties AS up ON substr(rev_timestamp,4) = up_user WHERE YEAR(user_registration) IN (2019, 2020, 2021, 2022, 2023, 2024) AND up_property = 'gender' AND substr(rev_timestamp,4) IS NOT NULL GROUP BY substr(rev_timestamp,4),up_value ORDER BY year;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...