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
.
Taken from #1279 See https://www.wikidata.org/wiki/Wikidata:Database_reports/Deleted_Wikidata_entities_that_are_still_linked
Toggle Highlighting
SQL
/*USE cswiki_p; SELECT pages.page_title, items.page_title FROM (SELECT * FROM page_props WHERE pp_propname = "wikibase_item") AS connected JOIN (SELECT * FROM wikidatawiki_p.page WHERE page_namespace = 0) AS items ON items.page_title = connected.pp_value JOIN (SELECT * FROM wikidatawiki_p.pagelinks WHERE pl_title = "Q4167410" AND pl_namespace = 0) AS pagelinks ON pagelinks.pl_from = items.page_id JOIN (SELECT * FROM page WHERE page_namespace = 0 AND page_is_redirect = 0) AS pages ON pages.page_id = connected.pp_page WHERE NOT EXISTS ( SELECT * FROM page_props AS disambigs WHERE disambigs.pp_page = connected.pp_page AND disambigs.pp_propname = "disambiguation" ); */ SELECT page_title FROM (SELECT * FROM wikidatawiki_p.pagelinks WHERE pl_title = "Q4167410" AND pl_from_namespace = 0 AND pl_namespace = 0) AS pagelinks JOIN wikidatawiki_p.page ON page_id = pl_from JOIN (SELECT * FROM cswiki_p.page_props WHERE pp_propname = "wikibase_item") AS connected ON pp_value = page_title LEFT JOIN (SELECT * FROM cswiki_p.page_props WHERE pp_propname = "disambiguation") AS disambig ON disambig.pp_page = connected.pp_page WHERE disambig.pp_page IS NULL;
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...