This query is marked as a draft This query has been published by Cryptic.

SQL

AخA
 
SELECT CASE
         WHEN ipb_user = 0 THEN 'anon'
         ELSE 'registered'
       END AS 'anon/reg',
       CASE
         WHEN ipb_expiry = 'infinity' THEN 'infinity'
         ELSE DATE_FORMAT(ipb_expiry, '%Y %M')
       END AS 'expiry',
       COUNT(*)
FROM ipblocks
GROUP BY ipb_user = 0, LEFT(ipb_expiry, 6);
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.

Checking query status...