Jump to content

User:SQL/Inactive

From Wikipedia, the free encyclopedia
SELECT Max(log_timestamp), 
       Max(rev_timestamp), 
       user_name 
FROM   user 
       JOIN user_groups 
         ON ( user_id = ug_user ) 
       JOIN logging_userindex 
         ON( log_user = user_id ) 
       JOIN revision_userindex 
         ON ( rev_user = user_id ) 
WHERE  ug_group = 'sysop' 
       AND (SELECT Max(log_timestamp) 
            FROM   logging_userindex 
            WHERE  log_user = user_id 
            LIMIT  1) < '20170204000000' 
       AND (SELECT Max(rev_timestamp) 
            FROM   revision_userindex 
            WHERE  log_user = user_id 
            LIMIT  1) < '20170204000000';