Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Zache
.
Toggle Highlighting
SQL
USE fiwiki_p; SET @date_filter="20161018"; SELECT CONCAT("{{kumouslista", "\n| sivu=", page_title, "\n| käyttäjä=", r.rev_user_text, "\n| kommentti=", r.rev_comment, "\n| rev_id=", r.rev_id, "\n| aikaleima=", r.rev_timestamp, "\n| syy=", "\n| kuvaus=", "\n}}") as template FROM page, revision as r LEFT JOIN ( SELECT ug_user AS user_id FROM user_groups WHERE ug_group='bot' UNION SELECT ufg_user AS user_id FROM user_former_groups WHERE ufg_group='bot' UNION SELECT user_id FROM user WHERE user_name REGEXP "(\b|\s|[-_ ])[Bb][-_]?[o0O][-_]?[tT]|[Bb][-_]?[o0O][-_]?[tT](\b|\s|[-_ ]|$)" GROUP BY user_id ) AS robots ON robots.user_id=r.rev_user , ( SELECT r1.rev_id FROM revision as r1, revision as r2 WHERE FLOOR(r1.rev_timestamp/1000000)=@date_filter AND r1.rev_page=r2.rev_page AND r1.rev_id > r2.rev_id AND r1.rev_sha1 = r2.rev_sha1 AND r1.rev_comment NOT REGEXP "[Ss]iirsi|[Ss]uojasi|[Bb]otti muokkasi|[Bb]otti lisäsi|[Bb]otti poisti" UNION SELECT r1.rev_id FROM revision_userindex as r1 WHERE FLOOR(r1.rev_timestamp/1000000)=@date_filter AND rev_comment REGEXP "(\b|\s| |^)rvv?(\b|\s| |$)|(ontriributions/|uokkaukset/)|palautettu|kumottu|hylätty" ) AS filter WHERE filter.rev_id=r.rev_id AND robots.user_id IS NULL AND page_namespace=0 AND page_id=r.rev_page GROUP BY filter.rev_id ORDER BY r.rev_timestamp;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...