Adresa
:
[go:
nahoru
,
domu
]
Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Lifetime NPP Stats for a single reviewer
by
MPGuy2824
This query is marked as a draft
This query has been published
by
Hey man im josh
.
Toggle Highlighting
SQL
SET @username = 'Elli'; -- spaces not underscores -- Reviews SELECT COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles Reviewed`, COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects Reviewed`, COUNT(DISTINCT(logtemp.log_page)) AS `Total` 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 JOIN actor on log_actor=actor_id WHERE actor_name=@username AND ((log_type = 'patrol' AND log_action = 'patrol') OR (log_type = 'pagetriage-curation' AND log_action in ('reviewed', 'reviewed-article', 'reviewed-redirect'))) AND log_namespace = 0 ) logtemp JOIN actor ON actor_id = log_actor; -- Deletion tagging SELECT COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles marked for deletion`, COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects marked for deletion`, COUNT(DISTINCT(logtemp.log_page)) AS `Total` 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 JOIN actor on log_actor=actor_id WHERE actor_name=@username AND log_type = 'pagetriage-curation' AND log_action = 'delete' AND log_namespace = 0 ) logtemp JOIN actor ON actor_id = log_actor; -- Maintainence Tagging /* SELECT COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles marked with maintainence tags`, COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects marked with maintainence tags`, COUNT(DISTINCT(logtemp.log_page)) AS `Total` 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 JOIN actor on log_actor=actor_id WHERE actor_name=@username AND log_type = 'pagetriage-curation' AND log_action = 'tag' AND log_namespace = 0 ) logtemp JOIN actor ON actor_id = log_actor; */ -- Unreviews /* SELECT COUNT(IF(logtemp.page_is_redirect = 0, 1, NULL)) as `Articles unreviewed`, COUNT(IF(logtemp.page_is_redirect = 1, 1, NULL)) as `Redirects unreviewed`, COUNT(DISTINCT(logtemp.log_page)) AS `Total` 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 JOIN actor on log_actor=actor_id WHERE actor_name=@username AND log_type = 'pagetriage-curation' AND log_action = 'unreviewed' AND log_namespace = 0 ) logtemp JOIN actor ON actor_id = log_actor; */
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...