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_value, pl_title, iwl.iwl_title, ccat.cat_title, ccat.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 p2, wikidatawiki_p.pagelinks AS pl2, commonswiki_p.page AS cp, commonswiki_p.iwlinks AS ciwl, commonswiki_p.category AS ccat 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=p2.page_title AND p2.page_namespace=0 AND pl2.pl_from=p2.page_id AND pl2.pl_title="P373" AND (iwl.iwl_title!="Etusivu" OR iwl.iwl_title IS NULL) AND iwl.iwl_title IS NULL AND pp_value=ciwl.iwl_title AND ciwl.iwl_prefix="d" AND ciwl.iwl_from=cp.page_id AND cp.page_namespace=14 AND ccat.cat_title=cp.page_title AND ccat.cat_pages>50 ORDER BY ccat.cat_files DESC LIMIT 100
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...