Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Last 30d IP vandalism ratio per subnets (fiwiki)
by
Jmk
This query is marked as a draft
This query has been published
by
Zache
.
Toggle Highlighting
SQL
use fiwiki_p; select ts, reverts_ip_range, c, afl_c, ipb_expiry from (select max(r2.rev_timestamp) as ts, CONCAT(SUBSTR(REGEXP_SUBSTR(lower(r2.rev_comment),'/([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})'),2),"") AS reverts_ip_range,COUNT(DISTINCT REGEXP_SUBSTR(lower(r2.rev_comment),'/([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})')) AS revert_address_count, sum(1) as c from revision_userindex as r1, revision_userindex as r2 where r1.rev_user=0 and r1.rev_user_text like "62.148%" and r1.rev_timestamp > 20160023105716 and r1.rev_page=r2.rev_page and r2.rev_timestamp > 20170023105716 and r2.rev_comment like "%/62.148%" group by reverts_ip_range ) as t LEFT JOIN ipblocks ON ipblocks.ipb_address=reverts_ip_range LEFT JOIN (SELECT sum(1) as afl_c, afl_user_text from abuse_filter_log WHERE afl_timestamp > 20170023105716 group by afl_user_text) as tt ON afl_user_text= reverts_ip_range group by reverts_ip_range;
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...