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
.
NPP - total reviews split by articles and redirects over various time periods
Toggle Highlighting
SQL
select * from ( SELECT "24 hours" as t, COUNT(*) AS `reviews`, COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles`, COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects` FROM ( SELECT distinct 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 (NOW() - INTERVAL 1 DAY) AND NOW() AND ((log_type = 'patrol' AND log_action = 'patrol') OR (log_type = 'pagetriage-curation' AND log_action = 'reviewed')) AND log_namespace = 0 ) logtemp UNION SELECT "7 days" as t, COUNT(*) AS `reviews`, COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles`, COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects` FROM ( SELECT distinct 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 (NOW() - INTERVAL 7 DAY) AND NOW() AND ((log_type = 'patrol' AND log_action = 'patrol') OR (log_type = 'pagetriage-curation' AND log_action = 'reviewed')) AND log_namespace = 0 ) logtemp );
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...