SQL
x
use fiwiki_p;
select rc_title, linktext, el_to from (
select
concat("# [[", replace(rc_title, '_', ' '), "]] ") as rc_title,
concat('<small><span class=plainlinks>([https://fi.wikipedia.org/w/index.php?diff=cur&oldid=', min(rc_last_oldid), ' diff])</span></small>') as linktext,
group_concat(distinct(IF (el_to LIKE '%calculusfennicus%', 'calculusfennicus', ''))) as el_to,
max(rc_this_oldid) as max_rev_id,
r1.rev_actor,
rc_cur_id
from
recentchanges LEFT JOIN externallinks ON el_from=rc_cur_id,
actor,
comment,
page,
revision AS r1 LEFT JOIN revision AS r2 ON r1.rev_page=r2.rev_page AND r1.rev_sha1=r2.rev_sha1 AND r1.rev_actor!=r2.rev_actor
where
rc_comment_id=comment_id
and actor_name="Putsari"
and actor_id=rc_actor
and rc_source="mw.edit"
and rc_namespace=0
and comment_text REGEXP '^(läpikäyntiä|päivitys)$'
and rc_timestamp > 20190703200000
and (rc_new_len-rc_old_len)>50
and page_namespace=0
and rc_cur_id=page_id
and page_latest=r1.rev_id
and r2.rev_id IS NULL
group by rc_title
) as t, revision as r3, comment
WHERE
NOT (t.rc_cur_id=r3.rev_page
AND t.max_rev_id < r3.rev_id
AND t.rev_actor!=r3.rev_actor
AND r3.rev_comment_id=comment_id
AND comment_text NOT LIKE "%rv%")
order by rc_title
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.