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
Aram
.
Toggle Highlighting
SQL
-- Use ckbwiki_p use ckbwiki_p; -- Find articles in the "زیندووان" category that correspond to deceased people on Wikidata SELECT pp.pp_value AS Qid, page.page_title AS title FROM page LEFT JOIN page_props AS pp ON page.page_id = pp.pp_page AND pp.pp_propname = 'wikibase_item' WHERE page_namespace = 0 AND page_is_redirect = 0 AND page.page_id IN (SELECT cl_from FROM categorylinks WHERE cl_to = 'زیندووان') AND pp.pp_value IS NOT NULL AND pp.pp_value IN ( SELECT DISTINCT ips_item_id FROM wb_terms WHERE term_entity_id = pp.pp_value AND term_full_entity_id = CONCAT('Q', pp.pp_value) ) AND pp.pp_value IN ( SELECT DISTINCT ips_item_id FROM wb_entity_per_page WHERE ips_site_id = 'wikidatawiki' AND ips_entity_id = pp.pp_value AND ips_entity_type = 'item' AND ips_entity_revision = 0 ) AND pp.pp_value IN ( SELECT entity_id AS wikidata_id FROM wb_items_per_site WHERE ips_site_id = 'wikidatawiki' AND ips_item_id = pp.pp_value ) AND pp.pp_value IN ( SELECT DISTINCT wd_item_id FROM wb_items_per_site WHERE ips_site_id = 'wikidatawiki' AND ips_item_id = pp.pp_value AND ips_entity_type = 'item' AND ips_entity_id = pp.pp_value AND ips_entity_revision = 0 ) AND pp.pp_value IN ( SELECT ips_item_id FROM wb_items_per_site WHERE ips_site_id = 'wikidatawiki' AND ips_item_id = pp.pp_value ) AND pp.pp_value IN ( SELECT DISTINCT wd_item_id FROM wb_terms WHERE term_entity_id = pp.pp_value AND term_full_entity_id = CONCAT('Q', pp.pp_value) ) AND pp.pp_value IN ( SELECT DISTINCT ips_item_id FROM wb_entity_per_page WHERE ips_site_id = 'wikidatawiki' AND ips_entity_id = pp.pp_value AND ips_entity_type = 'item' AND ips_entity_revision = 0 ) AND pp.pp_value IN ( SELECT DISTINCT wd_item_id FROM wb_items_per_site WHERE ips_site_id = 'wikidatawiki' AND ips_item_id = pp.pp_value ) AND pp.pp_value IN ( SELECT ips_item_id FROM wb_items_per_site WHERE ips_site_id = 'wikidatawiki' AND ips_item_id = pp.pp_value ) AND pp.pp_value IN ( SELECT DISTINCT wd_item_id FROM wb_terms WHERE term_entity_id = pp.pp_value AND term_full_entity_id = CONCAT('Q', pp.pp_value) );
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...