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
.
TPE
Toggle Highlighting
SQL
SET @group = 'bot'; USE mediawikiwiki_p; SELECT u.user_name, rev.rev_timestamp AS 'Last edit', log.log_timestamp AS 'Last log entry', ug.ug_group FROM user u JOIN user_groups ug ON u.user_id = ug.ug_user AND ug.ug_group NOT IN ('autopatroller') /**/ /* AND ug.ug_group = @group /**/ JOIN actor a ON a.actor_user = u.user_id JOIN revision_userindex rev ON rev.rev_id = ( SELECT rev2.rev_id FROM revision_userindex rev2 WHERE a.actor_id = rev2.rev_actor ORDER BY rev2.rev_timestamp DESC LIMIT 1 ) JOIN logging_userindex log ON log.log_id = ( SELECT log2.log_id FROM logging_userindex log2 WHERE a.actor_id = log2.log_actor ORDER BY log2.log_timestamp DESC LIMIT 1 ) ORDER BY u.user_name
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...