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
Matěj Suchánek
.
Toggle Highlighting
SQL
USE cswiki_p; SELECT afl_filter, 1 - (SUM(IF(afl_actions LIKE '%warn%', 1, 0)) - SUM(IF(afl_actions LIKE '%warn%', 0, 1))) / COUNT(*) AS ratio, MIN(afl_timestamp) FROM abuse_filter_log AS afl1 WHERE afl_filter NOT LIKE 'global-%' AND EXISTS (SELECT 1 FROM abuse_filter_action WHERE afa_filter = afl_filter AND afa_consequence = 'warn') AND NOT EXISTS (SELECT 1 FROM abuse_filter_action WHERE afa_filter = afl_filter AND afa_consequence = 'disallow') AND afl_timestamp >= ( SELECT afl2.afl_timestamp FROM abuse_filter_log AS afl2 WHERE afl2.afl_filter = afl1.afl_filter AND afl2.afl_actions LIKE '%warn%' ORDER BY afl2.afl_timestamp ASC LIMIT 1 ) GROUP BY afl_filter ORDER BY rate;
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...