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
.
Links from mainspace to draft. This excludes links links that both 1) are to the same title (such as from [[!Kung mythology]] to [[Draft:!Kung mythology]]) and 2) the mainspace page transcludes either {{R with possibilities}} or {{R from upcoming film}}, which always create a link to the page's title in draftspace even though they don't necessarily display it.
Toggle Highlighting
SQL
SELECT COUNT(*), CONCAT('Draft:', pl_title) AS title, NOT EXISTS (SELECT 1 FROM page WHERE page_namespace = 118 AND page_title = pl_title) AS 'Draft is redlink', GROUP_CONCAT(page_title SEPARATOR ' | ') AS 'from' FROM pagelinks JOIN page ON page_id = pl_from WHERE pl_from_namespace = 0 AND pl_namespace = 118 AND (NOT EXISTS (SELECT 1 FROM templatelinks JOIN linktarget ON lt_id = tl_target_id WHERE tl_from = pl_from AND lt_namespace = 10 AND lt_title IN ('R_with_possibilities', 'R_from_upcoming_film')) OR pl_title != page_title) GROUP BY pl_title;
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...