Fork of All partial blocks by Cryptic
This query is marked as a draft This query has been published by Cryptic.

SQL

AخA
 
SELECT ipblocks.ipb_address AS blockee,
       ipblocks.ipb_sitewide AS sitewide,
       ipblocks.ipb_timestamp AS timestamp,
       ipblocks.ipb_expiry AS expiry,
       ipblocks_compat.ipb_by_text AS blocker,
       ipblocks_compat.ipb_reason AS reason,
       ipblocks.ipb_anon_only AS anon_only,
       ipblocks.ipb_create_account AS create_account,
       ipblocks.ipb_enable_autoblock AS enable_autoblock,
       ipblocks.ipb_block_email AS block_email,
       ipblocks.ipb_allow_usertalk AS allow_usertalk
FROM ipblocks
-- Joining actor_ipblocks and comment_ipblocks instead of ipblocks_compat, like you're "supposed" to, kills performance.
JOIN ipblocks_compat ON ipblocks_compat.ipb_id = ipblocks.ipb_id
WHERE ipblocks.ipb_auto = 0 -- omit autoblocks
  AND ipblocks.ipb_address IN (SELECT log_title
                               FROM logging
                               WHERE log_type = 'block' AND log_action = 'block'
                                 AND log_params LIKE '%sitewide";b:0%'
                                 AND log_timestamp >= '201912' -- partial blocking enabled on enwiki by Dec 2019 RFC
                              );
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...