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
Huji
.
Toggle Highlighting
SQL
SELECT block_logs.* FROM ( SELECT log_id, log_id AS log_id_title, actor_name, log_namespace, log_title, log_timestamp, log_comment_id, DATEDIFF( DATE( CONCAT( SUBSTRING(log_params, locate('s:6:"expiry";', log_params) + 19, 4), SUBSTRING(log_params, locate('s:6:"expiry";', log_params) + 23, 2), SUBSTRING(log_params, locate('s:6:"expiry";', log_params) + 25, 2) ) ), date(substring(log_timestamp, 1, 8)) ) AS duration_days, CASE WHEN log_params LIKE '%s:6:"expiry";s:8:"infinity"%' THEN 1 ELSE 0 END AS duration_infinity FROM logging_userindex JOIN actor ON log_actor = actor_id WHERE log_type = 'protect' AND log_action = 'protect' AND log_actor IN ( SELECT actor_id FROM actor JOIN user ON actor_user = user_id JOIN user_groups ON ug_user = user_id AND ug_group = 'eliminator' ) ) AS block_logs WHERE duration_days > 14 OR duration_infinity = 1 ORDER BY log_id DESC
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...