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
JMatazzoni (WMF)
.
Toggle Highlighting
SQL
SELECT COUNT(*) AS `total articles`, SUM(IF(mapframes > 0, 1, 0)) AS `articles with a mapframe`, SUM(COALESCE(mapframes, 0)) AS `total mapframes`, SUM(IF(mapframes > 0, 1, 0))/COUNT(*) AS `mapframe prevalence` FROM ( SELECT p.page_id, pp_value AS mapframes FROM ( SELECT pp_page, pp_value FROM cawiki_p.page_props WHERE pp_propname = 'kartographer_frames' AND pp_value > 0 ) AS filtered_props RIGHT JOIN ( SELECT page_id FROM cawiki_p.page WHERE page_namespace = 0 AND page_is_redirect = 0 ) p ON p.page_id = filtered_props.pp_page ) joined_tables;
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...