Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Pppery
.
Toggle Highlighting
SQL
use enwikinews_p; set @9mo = "20190716000000"; set @12mo = "20190416000000"; select actor_name as "Username", replace(ug_group,"editor","reviewer") as "Right to revoke" from user_groups join actor_user on actor_user=ug_user where ((ug_group="sysop" or ug_group="bureaucrat") and not exists (select 1 from revision_userindex where rev_actor=actor_id and rev_timestamp > @9mo) -- "Once a bureaucrat is downgraded to administrator, the clock starts for inactivity as an administrator." and not exists (select 1 from metawiki_p.logging where log_type="rights" and log_title=concat(replace(actor_name," ","_"),"@enwikinews") and log_namespace = 2 and log_timestamp > @9mo and log_params like "%bureaucrat%" and log_params not like "%bureaucrat%bureaucrat%") ) or (ug_group="bureaucrat" and not exists (select 1 from logging_userindex where log_actor=actor_id and log_type="rights" and log_timestamp > @12mo)) -- logged admin action querying is too complex or ((ug_group="editor") and not exists (select 1 from revision_userindex join change_tag on ct_rev_id=rev_id join change_tag_def on ctd_id=ct_tag_id where rev_actor=actor_id and rev_timestamp > @12mo and ctd_name="mw-rollback") -- rollback and not exists (select 1 from logging_userindex where log_actor=actor_id and log_type="review" and log_timestamp > @9mo) -- review and not exists (select 1 from revision_userindex join comment_revision on rev_comment_id=comment_id where rev_actor=actor_id and comment_text like "%easy peer review%" and rev_timestamp > @9mo) -- Deliberately excluding rights also held by autoconfirmed ); select pl_title as "Username", "accredited" as "Right to revoke" from pagelinks join actor on actor_name=replace(pl_from,"_"," ") where pl_from=4918 and pl_namespace=2 and not exists (select 1 from revision_userindex where rev_actor=actor_id and rev_timestamp > @9mo); ;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...