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
Zache
.
Query finds fiwiki Find articles with P373 value, but without link commons (=commonscat template). Filter out commons categories without least 50 files.
Toggle Highlighting
SQL
USE fiwiki_p; SELECT p.page_title, pp.pp_value, d_pl.pl_title, iwl.iwl_title, c_cat.cat_title, c_cat.cat_pages FROM page AS p LEFT JOIN iwlinks AS iwl ON p.page_id=iwl.iwl_from AND iwl.iwl_prefix="commons", page_props AS pp, wikidatawiki_p.page AS d_p, wikidatawiki_p.pagelinks AS d_pl, commonswiki_p.page AS c_p, commonswiki_p.iwlinks AS c_iwl, commonswiki_p.category AS c_cat WHERE p.page_is_redirect!=1 AND p.page_len>500 AND p.page_namespace=0 AND p.page_id=pp.pp_page AND pp.pp_propname="wikibase_item" AND pp.pp_value=d_p.page_title AND d_p.page_namespace=0 AND d_pl.pl_from=d_p.page_id AND d_pl.pl_title="P373" AND (iwl.iwl_title!="Etusivu" OR iwl.iwl_title IS NULL) AND iwl.iwl_title IS NULL AND pp.pp_value=c_iwl.iwl_title AND c_iwl.iwl_prefix="d" AND c_iwl.iwl_from=c_p.page_id AND c_p.page_namespace=14 AND c_cat.cat_title=c_p.page_title AND c_cat.cat_pages>100 ORDER BY c_cat.cat_files DESC LIMIT 1000
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...