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
RiazACU
.
Toggle Highlighting
SQL
SELECT old_users.user_name AS old_user_name, new_users.user_name AS new_user_name, p.page_title AS subpage_title FROM page p JOIN user old_users ON p.page_title LIKE CONCAT(old_users.user_name, '/%') JOIN ( SELECT REPLACE(log_title, '_', ' ') AS old_user_name, SUBSTRING_INDEX(SUBSTRING_INDEX(log_params, '\n', -1), '=', -1) AS new_user_name FROM logging WHERE log_type = 'renameuser' ) renamed_users ON old_users.user_name = renamed_users.old_user_name JOIN user new_users ON new_users.user_name = renamed_users.new_user_name WHERE p.page_namespace = 2 AND NOT p.page_title LIKE CONCAT(new_users.user_name, '/%') ORDER BY old_users.user_name, p.page_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...