SQL
x
use hewiki_p;
select count(log_id), log_id, log_timestamp, log_user, distinct(log_title), log_comment, log_user_text, log_page from logging
where log_action = "delete"
and log_namespace = 0
and (log_comment like "%הובהרה חשיבות%"
or log_comment like "%הבהרת חשיבות%")
and exists
(select * from archive
where log_namespace = ar_namespace
and log_title = ar_title
and datediff(log_timestamp, ar_timestamp) >= 5)
and not exists
(select * from page
where log_title = page_title
and page_namespace = 0)
and (exists
(select * from page
where log_title = page_title
and page_namespace = 1)
or exists
(select * from archive
where ar_title = log_title
and ar_namespace = 1))
group by log_title
order by log_id 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.