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

SQL

AخA
 
USE outreachwiki_p;
SELECT
CONCAT("[[User:", user_name, "|", user_name, "]]") AS Username
FROM user_groups
INNER JOIN user
 ON ug_user = user_id
WHERE ug_group = "sysop" #user is outrech admin
AND ug_user NOT IN ( #no logactions in the past 12 months
  SELECT log_user
  FROM logging_compat
  WHERE log_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -12 MONTH), "%Y%m%d%H%i%s")
  AND log_type IN ("block","delete","import","protect","rights", "merge", "massmessage", "abusefilter") #adminactions
)
AND user_name NOT IN ( #no edits in the past 12 months
  SELECT rev_user_text
  FROM revision_compat
  WHERE rev_timestamp > DATE_FORMAT(DATE_ADD(NOW(), INTERVAL -12 MONTH), "%Y%m%d%H%i%s")
  AND rev_user_text != "DummyAndClause" #dummy and clause to make query working (bug?!)
)
;
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...