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
Pols12
.
List all pages which have a page content language different from subpage name which should be the explicit language code. v2
Toggle Highlighting
SQL
SELECT t1.page_lang, t1.page_namespace, t1.page_title, SUBSTRING_INDEX(t1.page_title, '/', -1) AS suffix, -- last subpage name LEFT(t1.page_title, CHAR_LENGTH(t1.page_title) - LOCATE('/', REVERSE(t1.page_title))) AS base, -- page name without suffix revtag.rt_page FROM page AS t1 LEFT JOIN revtag ON t1.page_id = revtag.rt_page LEFT JOIN ( SELECT page_title, rt_page FROM page LEFT JOIN revtag ON page_id = rt_page ) AS t2 ON t1.base = t2.page_title AND t1.page_namespace = t2.page_namespace WHERE revtag.rt_page IS NULL -- not handled by Translate extension (excludes translatable pages and translation units, but not translation pages) AND t2.rt_page IS NULL AND t1.page_title LIKE '%/%' HAVING ( suffix = 'fr' ) AND t1.page_title NOT LIKE CONCAT('%/', IFNULL(t1.page_lang, 'en')) LIMIT 1
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...