Fork of New Page Reviewers eligible for barnstars - 2022(articles) by MPGuy2824
This query is marked as a draft This query has been published by Novem Linguae.

SQL

AخA
 
SELECT actor_name AS `reviewer`,
      sum(case when logtemp.page_is_redirect = 0 then 1 else 0 end) as `Article Reviews`
      FROM (
        SELECT log_actor, log_page, page_is_redirect
        FROM logging_userindex
        JOIN page ON page_title = log_title AND page_namespace = log_namespace
        WHERE log_timestamp BETWEEN 20210101000000 AND 20220101000000
        AND log_type = 'patrol'
        AND log_action = 'patrol'
        AND log_namespace = 0
        UNION
        SELECT log_actor, log_page, page_is_redirect
        FROM logging_userindex
        JOIN page ON page_title = log_title AND page_namespace = log_namespace
        WHERE log_timestamp BETWEEN 20210101000000 AND 20220101000000
        AND log_type = 'pagetriage-curation'
        AND log_action = 'reviewed'
        AND log_namespace = 0
      ) logtemp,
      ipblocks.ipb_sitewide AS `currently_blocked`
JOIN actor ON actor_id = log_actor
JOIN user ON actor_user = user_id
LEFT JOIN ipblocks ON ipb_user = user_id
GROUP BY reviewer
HAVING `Article Reviews` >= 100
ORDER BY `Article Reviews` DESC
LIMIT 101;
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...