This query is marked as a draft This query has been published by DannyS712.

SQL

x
 
use mediawikiwiki_p;
SELECT
    COUNT(rc_id) AS 'edits', MAX(rc.rc_timestamp) AS 'last edit',
    actor.actor_name
FROM actor
    JOIN recentchanges_userindex AS rc ON actor_id = rc_actor
WHERE actor_user IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bureaucrat' )
AND rc_type = 0
GROUP BY actor_name
ORDER BY COUNT(*) DESC;
use mediawikiwiki_p;
SELECT
    a.actor_name,
    l.*
FROM actor a
    JOIN (
      SELECT COUNT(rc_id) AS 'edits', MAX(rc.rc_timestamp) AS 'last edit', rc_actor
      FROM recentchanges_userindex rc
      WHERE rc_type = 0
      GROUP BY rc_actor
    ) AS e ON e.rc_actor = a.actor_id
    JOIN (
      SELECT COUNT(rc_id) AS 'logs', MAX(rc.rc_timestamp) AS 'last log', rc_actor
      FROM recentchanges_userindex rc
      WHERE rc_type = 3
      GROUP BY rc_actor
    ) AS l ON l.rc_actor = a.actor_id
WHERE actor_user IN (SELECT ug_user FROM user_groups WHERE ug_group = 'bureaucrat' )
LIMIT 100
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.

Checking query status...