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
لوقا
.
Toggle Highlighting
SQL
SELECT u.user_name AS user_name, l.log_timestamp AS date_of_rights, MAX(a.actor_user) AS last_edit_user, MAX(a.actor_name) AS last_edit_user_name, MAX(a.actor_created) AS last_edit_user_created, COUNT(DISTINCT r.rev_id) AS edit_count_last_6_months FROM user AS u INNER JOIN user_groups AS ug ON u.user_id = ug.ug_user LEFT JOIN logging AS l ON l.log_title = REPLACE(u.user_name, ' ', '_') AND l.log_type = 'rights' AND ( l.log_params LIKE '%, sysop' OR l.log_params LIKE '%sysop' OR ( l.log_params NOT LIKE '%::oldgroups%sysop%5::newgroups%' AND l.log_params LIKE '%::newgroups%sysop%' ) ) LEFT JOIN actor AS a ON a.actor_name = REPLACE(u.user_name, ' ', '_') LEFT JOIN revision AS r ON r.rev_actor = a.actor_id AND r.rev_timestamp >= DATE_SUB(NOW(), INTERVAL 6 MONTH) WHERE ug.ug_group = 'sysop' GROUP BY u.user_name, l.log_timestamp;
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...