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
DannyS712
.
Toggle Highlighting
SQL
/** * Admin name * Timestamp of their 10th most recent edit * Timestamp of their 10th most recent **log entry** that requires admin rights, does not account for other admin actions * DOES NOT ACCOUNT FOR STEWARD ACTIONS BEING LOGGED AS ADMIN ACTIONS * * Log entries that count: * - abusefilter/* * - block/* * - delete/delete, /revision, /restore, /event * - import/* * - rights/rights * - protect/protect, /modify * * Not sure about * - massmessage * - pagetranslation * - pagelang * - patrol */ USE metawiki_p; SELECT a.actor_name, /* rev.rev_id, rev.rev_timestamp */ log.* FROM actor_user a /* JOIN revision_userindex rev ON rev.rev_id = ( SELECT rev_id FROM revision_userindex rev2 WHERE rev2.rev_actor = a.actor_id ORDER BY rev2.rev_timestamp DESC LIMIT 1 OFFSET 9 ) */ JOIN logging_userindex log ON log.log_id IN ( SELECT log_id FROM logging_userindex log2 WHERE log2.log_actor = a.actor_id AND ( log2.log_type IN ( 'abusefilter', 'block', 'import' ) OR CONCAT( log2.log_type, '/', log2.log_action ) IN ( 'delete/delete', 'delete/revision', 'delete/restore', 'delete/event', 'rights/rights', 'protect/protect', 'protect/modify' ) ) ORDER BY log2.log_timestamp DESC LIMIT 10 # OFFSET 9 ) AND a.actor_user IN ( SELECT ug_user FROM user_groups ug WHERE ug.ug_group = 'sysop' ) AND a.actor_name = 'DannyS712';
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...