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
Cryptic
.
For [[w:en:WP:VPT#List of redirects that target pages with certain properties?]] circa 27 Jun 2018.
Toggle Highlighting
SQL
SELECT CONCAT('[[', (CASE src.page_namespace WHEN 0 THEN '' WHEN 1 THEN 'Talk:' WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:' WHEN 4 THEN 'Wikipedia:' WHEN 5 THEN 'Wikipedia talk:' WHEN 6 THEN ':File:' WHEN 7 THEN 'File talk:' WHEN 8 THEN 'MediaWiki:' WHEN 9 THEN 'MediaWiki talk:' WHEN 10 THEN 'Template:' WHEN 11 THEN 'Template talk:' WHEN 12 THEN 'Help:' WHEN 13 THEN 'Help talk:' WHEN 14 THEN ':Category:' WHEN 15 THEN 'Category talk:' WHEN 100 THEN 'Portal:' WHEN 101 THEN 'Portal talk:' WHEN 108 THEN 'Book:' WHEN 109 THEN 'Book talk:' WHEN 118 THEN 'Draft:' WHEN 119 THEN 'Draft talk:' ELSE CONCAT('{{ns:', src.page_namespace, '}}:') END), src.page_title, ']]') AS redir_from, CONCAT( '[[', (CASE tgt.page_namespace WHEN 0 THEN '' WHEN 1 THEN 'Talk:' WHEN 2 THEN 'User:' WHEN 3 THEN 'User talk:' WHEN 4 THEN 'Wikipedia:' WHEN 5 THEN 'Wikipedia talk:' WHEN 6 THEN ':File:' WHEN 7 THEN 'File talk:' WHEN 8 THEN 'MediaWiki:' WHEN 9 THEN 'MediaWiki talk:' WHEN 10 THEN 'Template:' WHEN 11 THEN 'Template talk:' WHEN 12 THEN 'Help:' WHEN 13 THEN 'Help talk:' WHEN 14 THEN ':Category:' WHEN 15 THEN 'Category talk:' WHEN 100 THEN 'Portal:' WHEN 101 THEN 'Portal talk:' WHEN 108 THEN 'Book:' WHEN 109 THEN 'Book talk:' WHEN 118 THEN 'Draft:' WHEN 119 THEN 'Draft talk:' ELSE CONCAT('{{ns:', tgt.page_namespace, '}}:') END), tgt.page_title, ']]') AS redir_to FROM redirect JOIN page src ON rd_from = src.page_id JOIN page tgt ON rd_namespace = tgt.page_namespace AND rd_title = tgt.page_title WHERE src.page_title LIKE '%(disambiguation)' AND NOT EXISTS ( SELECT 1 FROM categorylinks WHERE cl_from = tgt.page_id AND cl_to = 'Disambiguation_pages' );
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...