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

SQL

AخA
 
use fawiki_p;
select
  log_id,
  log_timestamp,
  log_user,
  log_user_text,
  log_title,
  log_comment,
  log_page,
  page_namespace,
  case when ug_group = 'bot' then 1 else 0 end as user_is_bot,
  (
    select count(*)
    from revision_userindex
    where
      rev_user = log_user
      and rev_timestamp < log_timestamp
  ) as rev_count_before_move
from logging
join page
  on page_id = log_page
left join user_groups
  on log_user = ug_user
  and ug_group = 'bot'
where log_action = 'move'
and log_timestamp > '20171101000000'
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...