Fork of
fiwiki flaggedrevision approves
by Zache
This query is marked as a draft
This query has been published
by Zache.
SQL
x
use dewiki_p;
SELECT
A1.d, l1_c, sb_c, ac, (sb_c+ac) AS total, (ac+l1_c) as auto, ac/(sb_c+ac) as t1, l1_c/(sb_c+ac) as t2, (l1_c+ac)/(sb_c+ac) as t3
FROM
(
SELECT
floor(log_timestamp/10000000000) as d,
sum(1) as ac
FROM
logging_userindex
WHERE
log_action IN('approve-a', 'approve2-a')
AND log_type='review'
GROUP BY d
) AS A1 LEFT JOIN
(
SELECT
floor(log_timestamp/10000000000) as d,
sum(1) as l1_c
FROM
logging_userindex
WHERE
log_user_text='SeulojaBot'
AND log_action IN('approve', 'approve2')
AND log_type='review'
GROUP BY d
) AS L1 ON L1.d=A1.d LEFT JOIN
(
SELECT
floor(log_timestamp/10000000000) as d,
sum(1) as sb_c
FROM
logging_userindex
WHERE
log_action IN('approve', 'approve2')
AND log_type='review'
GROUP BY d
) AS L2 ON L2.d=A1.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.