Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
FlaggedRevs bug T164049: reviews per day change
by
Zache
This query is marked as a draft
This query has been published
by
Vito Genovese
.
https://phabricator.wikimedia.org/T164049
Toggle Highlighting
SQL
SELECT fi.d, ar.c AS ar, de.c AS de, fi.c AS fi, hu.c AS hu, pl.c AS pl, tr.c AS tr FROM (select floor(log_timestamp/1000000) as d, sum(1) as c, count(distinct(log_user)) as u, log_action, 'arwiki_p' as wiki from arwiki_p.logging where log_action IN ('approve', 'approve2', 'approve2', 'approve2-i') and log_timestamp > 20170415000000 group by d) as ar , (select floor(log_timestamp/1000000) as d, sum(1) as c, count(distinct(log_user)) as u, log_action, 'dewiki_p' as wiki from dewiki_p.logging where log_action IN ('approve', 'approve2', 'approve2', 'approve2-i') and log_timestamp > 20170415000000 group by d) as de , (select floor(log_timestamp/1000000) as d, sum(1) as c, count(distinct(log_user)) as u, log_action, 'fiwiki_p' as wiki from fiwiki_p.logging where log_action IN ('approve', 'approve2', 'approve2', 'approve2-i') and log_timestamp > 20170415000000 group by d) as fi , (select floor(log_timestamp/1000000) as d, sum(1) as c, count(distinct(log_user)) as u, log_action, 'huwiki_p' as wiki from huwiki_p.logging where log_action IN ('approve', 'approve2', 'approve2', 'approve2-i') and log_timestamp > 20170415000000 group by d) as hu , (select floor(log_timestamp/1000000) as d, sum(1) as c, count(distinct(log_user)) as u, log_action, 'plwiki_p' as wiki from plwiki_p.logging where log_action IN ('approve', 'approve2', 'approve2', 'approve2-i') and log_timestamp > 20170415000000 group by d) as pl , (select floor(log_timestamp/1000000) as d, sum(1) as c, count(distinct(log_user)) as u, log_action, 'trwiki_p' as wiki from trwiki_p.logging where log_action IN ('approve', 'approve2', 'approve2', 'approve2-i') and log_timestamp > 20170415000000 group by d) as tr WHERE fi.d = ar.d AND fi.d = de.d AND fi.d = hu.d AND fi.d = pl.d AND fi.d = tr.d GROUP by d
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...