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

SQL

x
 
use tawiki_p;
SELECT user_name, user_editcount, user_registration, rev_timestamp AS 'Last edit', log_timestamp AS 'Last log', ug1.ug_group AS 'user_group'
FROM `user`
LEFT JOIN user_groups ug1
    ON user_id = ug1.ug_user or ug1.ug_group IN ('bot')
JOIN revision_userindex
    ON rev_id = (SELECT rev_id FROM revision_userindex
                 WHERE user_id = rev_user
                 ORDER BY rev_timestamp DESC
                 LIMIT 1)
                 
JOIN logging_userindex
    ON log_id = (SELECT log_id FROM logging_userindex
                 WHERE user_id = log_user
                 ORDER BY log_timestamp DESC
                 LIMIT 1)
WHERE (user_editcount < 100 AND user_editcount > 0)
LIMIT 1000;
#WHERE (ug1.ug_group IS NOT NULL);
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...