This query is marked as a draft This query has been published by Zache.

SQL

AخA
 
SELECT fi.d,  ar.u AS ar, de.u AS de, fi.u AS fi, hu.u AS hu, pl.u AS pl, ru.u 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.

Checking query status...