Fork of Indef fully protected redirects by Anarchyte
This query is marked as a draft This query has been published by SD0001.

SQL

AخA
 
WITH items as (
  SELECT page_title, actor_name, log_timestamp, comment_text
  FROM page
  JOIN page_restrictions ON page_id = pr_page 
    AND pr_type = 'edit' 
    AND pr_level = 'sysop' 
    AND pr_expiry = 'infinity'
  LEFT JOIN logging_logindex ON log_namespace = page_namespace AND log_title = page_title 
    AND log_type = 'protect' 
    AND log_action != 'move_prot'
  LEFT JOIN comment_logging ON log_comment_id = comment_id
  LEFT JOIN actor_logging ON log_actor = actor_id
  WHERE page_namespace = 0
  AND page_is_redirect = 1
)
SELECT t1.* FROM items t1 
LEFT JOIN items t2 ON t1.page_title = t2.page_title AND t1.log_timestamp < t2.log_timestamp
WHERE t2.log_timestamp IS NULL
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...