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
Matěj Suchánek
.
Toggle Highlighting
SQL
USE wikidatawiki_p; SELECT page.*, external.*, wb_property_info.*#page_title, page_id, page_latest FROM page LEFT JOIN pagelinks AS backlinks ON backlinks.pl_title = page_title AND backlinks.pl_namespace = page_namespace AND backlinks.pl_from_namespace IN (0,120,146) JOIN page_props ON pp_page = page_id AND pp_propname = 'wb-sitelinks' AND pp_value = 0 LEFT JOIN pagelinks AS external ON external.pl_from = page_id AND external.pl_namespace = 120 LEFT JOIN wb_property_info ON pi_type = 'external-id' AND external.pl_title IS NOT NULL AND REPLACE(external.pl_title, 'Q', '') = pi_property_id WHERE page_namespace = 0 AND page_is_redirect = 0 AND backlinks.pl_from IS NULL AND pi_property_id IS NULL LIMIT 1; #SELECT * FROM wb_property_info WHERE pi_type = 'external-id' LIMIT 1;
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...