Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Miten automaattiseulottujen automaattisestihyväksyttyjen muokkausten määrät
by
Zache
This query is marked as a draft
This query has been published
by
Zache
.
Toggle Highlighting
SQL
use fiwiki_p; SELECT /* l1.log_title, */ a1.actor_name, floor(l1.log_timestamp/10000000000) as year, /* l1.log_params, */ count(distinct(l1.log_id)) as rights_given, count(distinct(l2.log_id)) as number_of_autoreviews, count(distinct(l2.log_page)) as number_of_autoreview_pages, count(distinct(concat( floor(l2.log_timestamp/1000000), l2.log_title))) as number_of_autoreviewed_page_days /* group_concat(distinct(a2.actor_name)) */ FROM /* Oikeuksien antamiset */ actor_logging as a1, logging_userindex as l1 LEFT JOIN ( /* Tällä poimitaan ne käyttäjät veks joilla on ollut oikeudet aikaisemmin */ select log_title, min(log_timestamp) as min_ts from logging_userindex where log_action="rights" and log_params regexp "editor|autoreview" group by log_title ) as l3 ON l3.log_title=l1.log_title AND l3.min_ts<l1.log_timestamp, /* Automaattiseulonnat */ logging_userindex as l2, actor_logging as a2 WHERE l1.log_action="rights" AND l1.log_actor=a1.actor_id /* AND l1.log_id>1611895 1.1.2010 */ AND l1.log_timestamp>20100023061016 AND ( ( l1.log_params NOT like "%oldgroups%autoreview%newgroups%" AND l1.log_params NOT like "%oldgroups%editor%newgroups%" AND l1.log_params like "%newgroups%autoreview%" ) OR ( l1.log_params NOT like "%oldgroups%autoreview%" AND l1.log_params NOT like "%newgroups%oldgroups%editor" AND l1.log_params like "%newgroups%autoreview%oldgroups%" ) OR ( l1.log_params NOT like "%oldgroups%editor%newgroups%" AND l1.log_params NOT like "%oldgroups%autoreview%newgroups%" AND l1.log_params like "%newgroups%editor%" ) OR ( l1.log_params NOT like "%oldgroups%editor%" AND l1.log_params NOT like "%newgroups%oldgroups%autoreview" AND l1.log_params like "%newgroups%editor%oldgroups%" ) ) AND l2.log_action IN ('approve-a', 'approve2-a', 'approve-ia', 'approve2-ia') AND l2.log_timestamp>20100023061016 /* AND l2.log_id>1611895 */ AND REPLACE(l1.log_title, "_", " ")=a2.actor_name AND a2.actor_id=l2.log_actor AND l3.log_title IS NULL /* Ei saa olla ollut oikeuksia aikaisemmin */ AND a1.actor_name IN ("Zache", "Jmk", "Lentokonefani") AND l1.log_title NOT IN ("Addbot", "Fiwiki-tools-bot", "Putsari","Xyzäö", "Xqbot", "YiFeiBot", "TohaomgBot") GROUP BY year, a1.actor_name
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...