SQL
AخA
SELECT
SUBSTR(log_timestamp, 1, 8) DAY,
SUM((log_type, log_action) = ('newusers', 'create')) ACCUNTS_CREATED,
SUM((log_type, log_action) = ('block', 'block')) BLOCKS,
SUM((log_type, log_action) = ('block', 'block') AND log_title NOT RLIKE '^(\\d+\\.\\d+\\.|[0-9a-fA-F]+:[0-9a-fA-F]+)') REGISTERED_USERS_BLOCKED
FROM logging
WHERE
log_timestamp > 20210601000000
AND (log_type, log_action) IN (('block', 'block'), ('newusers', 'create'))
GROUP 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.
All SQL code is licensed under CC0 License.
Query status: complete
Executed in 14.12 seconds as of Tue, 31 Aug 2021 09:50:12 UTC.