Fork of An editor's AFC review count by Novem Linguae
This query is marked as a draft This query has been published by MPGuy2824.

SQL

x
 
SELECT user_name as Editor, page_title as 'Example AFC', count(*) as AfCedits
 FROM revision_userindex
JOIN actor ON rev_actor = actor_id
JOIN comment_revision ON comment_id = rev_comment_id
JOIN page ON rev_page = page_id
JOIN user ON actor_user = user_id
WHERE actor_name = user_name -- spaces
AND page_title != REPLACE(user_name, ' ', '_') -- underscores
AND page_namespace = 3 -- user talk
AND comment_text RLIKE '(?:accepted|declined|rejected)'
-- FROM page
-- JOIN revision ON rev_page = page_id
--    JOIN actor ON actor_id = rev_actor
-- WHERE page_namespace = 4
-- AND page_title LIKE "Articles_for_deletion/%"
-- AND page_title NOT LIKE "Articles_for_deletion/Log/%"
    AND rev_timestamp > date_add(now(), interval -1 day)
    and user_editcount > 1000
    AND NOT EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'sysop') -- administrator
    AND NOT EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'patroller') -- new page patroller
    AND NOT EXISTS (SELECT 1 FROM user_groups WHERE user_id=ug_user AND ug_group = 'bot') -- new page patroller
    group by rev_actor
--    having AfCedits > 35
    order by AfCedits desc;
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...