SQL
AخA
SELECT fi.d, ar.c AS ar, de.c AS de, fi.c AS fi, hu.c AS hu, pl.c AS pl, ru.c AS ru 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, 'ruwiki_p' as wiki from ruwiki_p.logging where log_action IN ('approve', 'approve2', 'approve2', 'approve2-i') and log_timestamp > 20170415000000 group by d) as ru
WHERE fi.d = ar.d AND fi.d = de.d AND fi.d = hu.d AND fi.d = pl.d AND fi.d = ru.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.
All SQL code is licensed under CC0 License.