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
/** * Only looks at the last 183 days, which might not be exactly 6 months */ USE metawiki_p; SELECT a.actor_name, e.edits, e.last_edit, l.logs, l.last_log FROM actor_user a LEFT JOIN ( SELECT COUNT(rev_id) AS 'edits', MAX(rev.rev_timestamp) AS 'last_edit', rev_actor AS 'editor' FROM revision_userindex rev WHERE rev_timestamp < (DATE_FORMAT((NOW() - INTERVAL 183 DAY),'%Y%m%d%H%i%S')) GROUP BY rev_timestamp ) AS e ON e.editor = a.actor_id LEFT JOIN ( SELECT COUNT(log_id) AS 'logs', MAX(log.log_timestamp) AS 'last_log', log_actor AS 'logger' FROM logging_userindex log WHERE log_timestamp < (DATE_FORMAT((NOW() - INTERVAL 183 DAY),'%Y%m%d%H%i%S')) GROUP BY log_actor ) AS l ON l.logger = a.actor_id WHERE actor_user IN (SELECT ug_user FROM user_groups WHERE ug_group = 'sysop' )
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...