This query is marked as a draft This query has been published by Huji.

SQL

x
 
use fawiki_p;
select l1.*, l2.log_id, l2.log_timestamp, l2.log_user
from
(
select log_id, log_timestamp, log_title
from logging_userindex
where log_type = 'block'
and log_action = 'block'
and log_user = 427882 -- User:Abuse filter
order by log_id desc
limit 100
) l1
left join logging_logindex l2
  on l2.log_type = 'block'
  and l2.log_action = 'unblock'
  and l2.log_title = l1.log_title -- same target account
  and l2.log_namespace = 2 -- to allow using the page_time index
  and l2.log_timestamp > l1.log_timestamp -- unblock later than block
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...