SQL
AخA
select replace(concat("[[:{{subst:ns:",log_namespace,"}}:",replace(log_title,"_"," "),"]]"),":{{subst:ns:0}}:",":") as 'Page',
(select actor_name from actor_logging where actor_id=log_actor) as "Deleting admin",
comment_text as "Edit summary",
log_timestamp as "Timestamp" from logging_logindex join comment_logging on comment_id=log_comment_id
where log_type="delete" and log_action="delete"
and (
-- -- Speedy deletions
-- Generic category checks
(comment_text rlike "WP:(CSD#)?A[0-9]" and log_namespace != 0) -- A* criteria only apply to mainspace
or (comment_text rlike "WP:(CSD#)?F[0-9]" and log_namespace != 6) -- F* criteria only apply to files (primarily for completeness' sake, has no results in 2022 and only 4 in 2021)
or (comment_text rlike "WP:(CSD#)?C[0-9]" and log_namespace != 14) -- C* criteria only apply to categories
or (comment_text rlike "WP:(CSD#)?U[0-9]" and log_namespace != 2 and log_namespace != 3) -- U* criteria only apply to userpages
or (comment_text rlike "WP:(CSD#)?P[0-9]" and log_namespace != 100) -- P* criteria only apply to portals (again very unlikely to occur)
-- Specific criterion checks
or ((comment_text rlike "G1[^0123]" or comment_text like "%G2%") and log_namespace=2) -- G1 and G2 don't apply to userspace
-- or (comment_text like "%G7%" and log_namespace=3) -- G7 can in theory apply to user talk pages but is often misused
or (comment_text like "%G13%" and (log_namespace != 2 and log_namespace != 118)) -- G13 only applies to draft and user space
-- or (comment_text like "%U1%" and log_namespace=3) -- U1 does not apply to user talk pages
-- or (comment_text like "%U5%" and log_namespace=3) -- U1 does not apply to user talk pages
-- -- Deletion discussions
or (comment_text not like "%G8%XFDcloser%" and (
(comment_text like "%Articles_for_deletion%" and log_namespace != 0)
or (comment_text like "%Files_for_discussion%" and log_namespace != 6)
or (comment_text like "%Templates_for_discussion%" and log_namespace != 10 and log_namespace != 828)
or (comment_text like "%Categories_for_discussion%" and log_namespace != 14)
or (comment_text like "%Miscellany_for_deletion%" and (log_namespace in (0, 6, 14) or (log_namespace=10 and log_title
not like "User%")))
))
)
and comment_text not like "[[WP:CSD#G8|G8]]: Deleted together with the associated page with reason%"
and comment_text not like "%in userspace would be%"
and (log_timestamp like "2022%")
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.