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

SQL

AخA
 
USE metawiki_p;
SELECT actor_name, log_timestamp, REPLACE(log_title, "@global", "") AS username
FROM logging_userindex
JOIN actor ON log_actor = actor_id
AND actor_name ="ERoss (WMF)"
AND log_action = "setstatus"
AND log_params LIKE "%locked%"
HAVING username IN (
  select REPLACE(gu_name, " ", "_")
  FROM globaluser
  WHERE gu_name LIKE "%WMF)"
  AND gu_locked = 1 )
AND HAVING username NOT IN (
  SELECT page_title
  FROM page
  JOIN categorylinks ON page_id = cl_from
  AND cl_to = "Former_Wikimedia_Foundation_staff_accounts" );
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...