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
لوقا
.
Toggle Highlighting
SQL
SELECT day, SUM(CASE WHEN DAY = DAY(NOW()) - 6 THEN hit_count ELSE 0 END) AS day7, SUM(CASE WHEN DAY = DAY(NOW()) - 5 THEN hit_count ELSE 0 END) AS day6, SUM(CASE WHEN DAY = DAY(NOW()) - 4 THEN hit_count ELSE 0 END) AS day5, SUM(CASE WHEN DAY = DAY(NOW()) - 3 THEN hit_count ELSE 0 END) AS day4, SUM(CASE WHEN DAY = DAY(NOW()) - 2 THEN hit_count ELSE 0 END) AS day3, SUM(CASE WHEN DAY = DAY(NOW()) - 1 THEN hit_count ELSE 0 END) AS day2, SUM(CASE WHEN DAY = DAY(NOW()) THEN hit_count ELSE 0 END) AS day1 FROM ( SELECT DATE(afl_timestamp) AS day, COUNT(afl_filter_id) AS hit_count FROM abuse_filter_log INNER JOIN abuse_filter ON abuse_filter.af_id = abuse_filter_log.afl_filter_id WHERE afl_timestamp >= NOW() - INTERVAL 1 WEEK AND abuse_filter.af_enabled = 1 -- AND abuse_filter.af_hidden = 0 AND abuse_filter.af_deleted = 0 -- AND abuse_filter.af_hit_count > 0 GROUP BY day, afl_filter_id ) AS subquery GROUP BY day ORDER BY day;
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...