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
Fæ
.
Undeletes from a given date, with a comment like OTRS in the log, ordered by the length of time since deletion. This may bear no relationship to how recently an email was received at OTRS.
Toggle Highlighting
SQL
USE commonswiki_p; SELECT LEFT(l.log_title, 50), comment_text AS Comment, LEFT(l.log_timestamp, 8) AS UDate, DATEDIFF(LEFT(MAX(ll.log_timestamp), 8), LEFT(l.log_timestamp, 8)) AS Wait FROM logging AS l JOIN ( SELECT log_timestamp, log_page FROM logging WHERE log_action="delete" ) AS ll ON ll.log_page = l.log_page JOIN comment_logging ON l.log_comment_id = comment_id WHERE l.log_timestamp > 20190101000001 AND l.log_timestamp < 20190103000000 AND l.log_action = "restore" AND l.log_namespace = 6 AND comment_text LIKE "%OTRS%";
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...