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
Xiplus
.
Toggle Highlighting
SQL
/*SET @ns = 14;*/ /*SET @nsn = "分類討論";*/ CREATE FUNCTION `nsname`(`ns` INT) RETURNS VARCHAR(255) BEGIN RETURN case when ns = 0 then "" when ns = 1 then "Talk:" when ns = 2 then "User:" when ns = 3 then "User talk:" when ns = 4 then "Wikpeida:" when ns = 5 then "Wikpeida talk:" when ns = 6 then "File:" when ns = 7 then "File talk:" when ns = 8 then "Mediawiki:" when ns = 9 then "Mediawiki talk:" when ns = 10 then "Template:" when ns = 11 then "Template talk:" when ns = 12 then "Help:" when ns = 13 then "Help talk:" when ns = 14 then "Category:" when ns = 15 then "Category talk:" when ns = 100 then "Portal:" when ns = 101 then "Portal talk:" when ns = 118 then "Draft:" when ns = 119 then "Draft talk:" when ns = 828 then "Module:" when ns = 829 then "Module talk:" end END; USE zhwiki_p; SELECT CONCAT("https://zh.wikipedia.org/w/index.php?title=",nsname(page.page_namespace+1),":", page.page_title, "&redirect=no ") AS "talk link", CONCAT(nsname(page.page_namespace+1),":", page.page_title) AS "talk" FROM page LEFT JOIN page AS page2 ON page.page_title = page2.page_title AND page.page_namespace = page2.page_namespace+1 WHERE /*page.page_namespace = (@ns+1) AND*/ page.page_title NOT LIKE "%/%" AND page2.page_title 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...