SQL
AخA
select log_title as 'Page',
(select actor_name from actor_logging where actor_id=log_actor) as "Deleting admin",
comment_text as "Edit summary",
DATE_FORMAT(log_timestamp, '%Y-%m-%d %H:%i') as "Timestamp" from logging_logindex curdel join comment_logging on comment_id=log_comment_id
where log_type="delete" and log_action="delete"
and (comment_text like "%R2%")
-- The modulo and subtraction of 8800000000 handle year wraparound properly since years don't have 100 months
and exists (select 1 from archive where ar_namespace=log_namespace and ar_title=log_title
and ar_timestamp < IF((log_timestamp - 100000000 - 100000000) % 10000000000 > 1200000000,
log_timestamp - 100000000 - 8800000000,
log_timestamp - 100000000)
and ar_timestamp > COALESCE((select max(log_timestamp) from logging_logindex prevdel where (prevdel.log_type="delete" and
prevdel.log_action in ("delete", "delete_redir") and
prevdel.log_namespace=curdel.log_namespace and
prevdel.log_title=curdel.log_title and
prevdel.log_timestamp<curdel.log_timestamp)),0))
and log_namespace = 0
and log_timestamp like "202308%"
order by log_timestamp 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.