Fork of Qanat: undo candidates by Huji
This query is marked as a draft This query has been published by Yamaha5.

SQL

AخA
 
use fawiki_p;
select page_title, last_rev_id, rev_len
from revision r
join
(
  select
    max(rev_id) as last_rev_id,
    rev_page as page_id,
    q.page_title
  from
  (
    select page_id, page_title
    from revision
    join page
    on rev_page = page_id
    where page_title like 'قنات%'
    and rev_user = 100607 -- HujiBot
    and page_is_redirect = 1
  ) q
  join revision
    on q.page_id = rev_page
    and rev_user <> 100607 -- Hujibot
    and rev_user_text <> 'JYBot'
    and rev_user <> 0
    and rev_minor_edit <> 1
  group by rev_page
) qq
on r.rev_page = qq.page_id
and r.rev_id = qq.last_rev_id
order by rev_len desc
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...