Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
MPGuy2824
.
Toggle Highlighting
SQL
select reviewer, least(x.m1, x.m2, x.m3, x.m4, x.m5, x.m6, x.m7, x.m8, x.m9, x.m10, x.m11) as minimumMonthlyStreak from ( SELECT actor_name AS `Reviewer`, SUM(CASE WHEN month = 1 THEN 1 ELSE 0 END) AS m1, SUM(CASE WHEN month = 2 THEN 1 ELSE 0 END) AS m2, SUM(CASE WHEN month = 3 THEN 1 ELSE 0 END) AS m3, SUM(CASE WHEN month = 4 THEN 1 ELSE 0 END) AS m4, SUM(CASE WHEN month = 5 THEN 1 ELSE 0 END) AS m5, SUM(CASE WHEN month = 6 THEN 1 ELSE 0 END) AS m6, SUM(CASE WHEN month = 7 THEN 1 ELSE 0 END) AS m7, SUM(CASE WHEN month = 8 THEN 1 ELSE 0 END) AS m8, SUM(CASE WHEN month = 9 THEN 1 ELSE 0 END) AS m9, SUM(CASE WHEN month = 10 THEN 1 ELSE 0 END) AS m10, SUM(CASE WHEN month = 11 THEN 1 ELSE 0 END) AS m11 FROM ( SELECT distinct log_actor, log_page, page_is_redirect, MONTH(log_timestamp) as month FROM logging_userindex JOIN page ON page_title = log_title AND page_namespace = log_namespace WHERE YEAR(log_timestamp)=2023 and MONTH(log_timestamp)<12 AND ((log_type = "patrol" AND log_action = "patrol") OR (log_type = "pagetriage-curation" AND log_action in ("reviewed", "reviewed-article"))) AND log_namespace = 0 ) logtemp JOIN actor ON actor_id = log_actor JOIN user ON actor_user = user_id left JOIN ipblocks ON ipb_user = user_id where ipb_sitewide IS NULL and logtemp.page_is_redirect = 0 GROUP BY reviewer ) x order by minimumMonthlyStreak desc;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...