SQL
x
SELECT user_name, user_editcount, rev_timestamp AS 'Last edit',
CONCAT(substr(log_timestamp,1,4),"-",substr(log_timestamp,5,2), "-",substr(log_timestamp,7,2)," ",substr(log_timestamp,9,2)+7,":",substr(log_timestamp,11,2)) as 'Last Log',
ug1.ug_group AS 'user_group'
FROM `user`
LEFT JOIN user_groups ug1
ON user_id = ug1.ug_user AND ug1.ug_group IN ('sysop')
JOIN actor
ON actor_user = user_id
JOIN revision_userindex
ON rev_id = (SELECT rev_id FROM revision_userindex
WHERE actor_id = rev_actor
ORDER BY rev_timestamp DESC
LIMIT 1)
JOIN logging_userindex
ON log_id = (SELECT log_id FROM logging_userindex
WHERE actor_id = log_actor
ORDER BY log_timestamp DESC
LIMIT 1)
WHERE (
(ug1.ug_group IS NOT NULL)
)
ORDER BY log_timestamp DESC
;
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.