Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Mainspace pages with wikidata Q#s in title
by
Cryptic
This query is marked as a draft
This query has been published
by
Cryptic
.
Enwiki non-mainspace pages whose title contains a Wikidata Q number as a disambiguator; what they redirect to if they're currently redirects, and whether they're in [[Category:All redirects for discussion]]. For [[WT:CSD#Redirects with database (e.g. Wikidata) identifiers]] circa 5 Nov 2019 and [[Wikipedia:Redirects for discussion/Log/2019 November 5#Wikidata redirects]].
Toggle Highlighting
SQL
SELECT page_id, CONCAT('[[{{ns:', page_namespace, '}}:', page_title, ']]') AS 'page title', CASE WHEN page_is_redirect = 0 THEN NULL ELSE (SELECT CASE WHEN rd_namespace = 0 THEN CONCAT('[[', rd_title, ']]') ELSE CONCAT('[[{{ns:', rd_namespace, '}}:', rd_title, ']]') END FROM redirect WHERE rd_from = page_id) END AS 'redirect to', EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id AND cl_to = 'All_redirects_for_discussion') AS 'is on WP:RFD' FROM page WHERE page_namespace != 0 AND page_title RLIKE '\\(Q[0-9]+\\)';
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...