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, date(substring(log_timestamp, 1, 8)) as log_date, 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 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 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...