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

SQL

x
 
SELECT ipb_address, page_touched, comment_text AS reason, group_concat(el_to SEPARATOR '\n') AS links
 FROM ipblocks
  JOIN comment_ipblocks ON(ipb_reason_id=comment_id)
  JOIN page ON(page_namespace=3 AND page_title=REPLACE(ipb_address, ' ', '_'))
  JOIN externallinks ON(page_id=el_from)
 WHERE
  -- Indef-blocked user (not IP)
  ipb_expiry = 'infinity' AND ipb_user != 0
  
  -- Talk page access isn't already blocked
  AND ipb_allow_usertalk
  
  -- Skip partial blocks (disabled, see T221272)
  -- AND ipb_sitewide 
  
  -- Ignore external links included in some common templates
  AND el_to NOT LIKE '//tools.wmflabs.org/%'
  AND el_to NOT LIKE 'https://tools.wmflabs.org/%'
  AND el_to NOT LIKE 'http://tools.wmflabs.org/%'
  AND el_to NOT LIKE '//dispenser.info.tm/%'
  AND el_to NOT LIKE 'https://meta.wikimedia.org/%'
  
  -- Only look at recent blocks. Remove this if you want, but it'll take much longer to run.
  AND ipb_timestamp >= DATE_FORMAT(DATE_SUB(CURRENT_DATE, INTERVAL 1 MONTH), '%Y%m%d000000')
GROUP BY ipb_address ORDER BY page_touched DESC;
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...