This query is marked as a draft This query has been published by A smart kitten.

SQL

x
 
select * from recentchanges as rc1
left join (
  select * from recentchanges as rc2
  inner join page as p2 on rc2.rc_cur_id = p2.page_id
  where rc_type = 6
  and page_namespace = 3
  and rc_title = "Requests_for_unblock"
  and rc_params like '%"added";b:0;%'
) as rc2
  on rc1.rc_type = 3
  and rc2.page_title = rc1.rc_title
  and unix_timestamp(rc2.rc_timestamp)
    not between unix_timestamp(rc1.rc_timestamp) - (10 * 60) and unix_timestamp(rc1.rc_timestamp) + (10 * 60)
  and unix_timestamp(rc2.rc_timestamp)
    between unix_timestamp(rc1.rc_timestamp) - (60 * 60) and unix_timestamp(rc1.rc_timestamp) + (60 * 60)
where rc1.rc_type = 3
and rc1.rc_log_type = 'block'
and rc1.rc_log_action = 'unblock';
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...