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
BrandonXLF
.
Toggle Highlighting
SQL
# ID 41345117 and above use Like, all below use equal /* SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params LIKE '%"AAA"%' ORDER BY log_id DESC LIMIT 1; SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params LIKE '%"MediaWiki talk:ADFDsdfBVCGA"%' AND log_id < 94961978 ORDER BY log_id DESC LIMIT 1; SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params LIKE '%"AAA"%' AND log_id < 94961938 ORDER BY log_id DESC LIMIT 1; SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params LIKE '%"File talk:Aafgdh45wg364"%' AND log_id < 94961932 ORDER BY log_id DESC LIMIT 1; SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params = 'AAA' AND log_id < 94961917 ORDER BY log_id DESC LIMIT 1; SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params = 'Talk:AAAAA' AND log_id < 7933675 ORDER BY log_id DESC LIMIT 1; SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params = 'AAA' AND log_id < 7933160 ORDER BY log_id DESC LIMIT 1; */ BEGIN DECLARE namespaces table(number int, name string) INSERT INTO namespaces (number, name) VALUES (-2, 'Media') INSERT INTO namespaces (number, name) VALUES (-1, 'Special') INSERT INTO namespaces (number, name) VALUES (0, ' ') INSERT INTO namespaces (number, name) VALUES (1, 'Talk') INSERT INTO namespaces (number, name) VALUES (2, 'User') INSERT INTO namespaces (number, name) VALUES (3, 'User talk') INSERT INTO namespaces (number, name) VALUES (4, 'Project') INSERT INTO namespaces (number, name) VALUES (5, 'Project talk') INSERT INTO namespaces (number, name) VALUES (6, 'File') INSERT INTO namespaces (number, name) VALUES (7, 'File talk') INSERT INTO namespaces (number, name) VALUES (8, 'MediaWiki') INSERT INTO namespaces (number, name) VALUES (9, 'MediaWiki talk') INSERT INTO namespaces (number, name) VALUES (10, 'Template') INSERT INTO namespaces (number, name) VALUES (11, 'Template talk') INSERT INTO namespaces (number, name) VALUES (12, 'Help') INSERT INTO namespaces (number, name) VALUES (13, 'Help talk') INSERT INTO namespaces (number, name) VALUES (14, 'Category') INSERT INTO namespaces (number, name) VALUES (15, 'Category talk') DECLARE next_id INT DEFAULT 99999999999999; DECLARE page_ns INT DEFAULT 0; DECLARE page_ns_name DEFAULT ''; DECLARE page_title STRING DEFAULT 'AAA'; WHILE page_title DO SELECT name FROM namespaces WHERE number = page_ns LIMIT 1; SET page_ns_name = name; SELECT log_timestamp, log_title, log_actor, log_namespace, log_id FROM logging WHERE log_type = 'move' AND log_params = page_title AND log_id < next_id ORDER BY log_id DESC LIMIT 1; SET next_id = log_id; SET page_ns = log_namespace; SET page_title = log_title; END WHILE; END
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...