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
Nettrom
.
Find all articles deleted between Jan 1, 2017 and May 1, 2017, that were restored at least 24 hours afterwards.
Toggle Highlighting
SQL
USE enwiki_p; SELECT l1.log_title, l1.log_action, l1.log_timestamp, l2.log_action, l2.log_timestamp, TIMESTAMPDIFF(MINUTE, STR_TO_DATE(l1.log_timestamp, '%Y%m%d%H%i%s'), STR_TO_DATE(l2.log_timestamp, '%Y%m%d%H%i%s')) AS timediff FROM logging l1 JOIN logging l2 USING (log_page) WHERE l1.log_type='delete' AND l2.log_type='delete' AND l1.log_action='delete' AND l2.log_action='restore' AND l1.log_timestamp < l2.log_timestamp AND l1.log_timestamp >= '20170101000000' AND l1.log_timestamp < '20170501000000' AND l2.log_timestamp > '20170101000000' AND l1.log_namespace=0 AND TIMESTAMPDIFF(MINUTE, STR_TO_DATE(l1.log_timestamp, '%Y%m%d%H%i%s'), STR_TO_DATE(l2.log_timestamp, '%Y%m%d%H%i%s')) > 24*60;
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...