Fork of סקיבידי with timestamp by קיפודנחש
This query is marked as a draft This query has been published by IKhitron.

SQL

x
 
-- change the following values per your needs:
set @pattern = 'סקיבידי';  -- string to look for in edit comment
set @lookback_days = 90; -- days in the past to start searching from. to search "all history" use ridiculously large value - e.g. 40000 which is more than 100 years
set @namespace = 0; -- namespace number. to search all namespaces set next param, @all_namespaces to 1 - in this case, this variable is ignored
                    -- to search on more than one namespace but less then all, write a more sophisticated query.
set @all_namespaces = 0;
-- do not change the code below, unless you know what you are doing
set @first_date = now() - interval @lookback_days day;
set @first_timestamp = date_format(@first_date, '%Y%m%d%h%i%s');
select * from revision r 
join page p on r.rev_page = p.page_id
join actor a on r.rev_actor = a.actor_id
join comment c on r.rev_comment_id = c.comment_id
where (@all_namespaces = 1 or p.page_namespace = @namespace)
        and r.rev_timestamp > @first_timestamp
        and c.comment_text REGEXP @pattern > 0
        and not exists(select 1 from logging where log_page = p.page_id and log_timestamp = r.rev_timestamp)
order by r.rev_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.

Checking query status...