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

SQL

AخA
 
use huwiki_p;
SELECT
    user_name user,
    count(*) as review_cnt
FROM
    logging
    JOIN actor ON log_actor = actor_id
    JOIN user ON actor_user = user_id
WHERE
    log_type = 'review'
    AND log_action IN ('approve', 'approve2', 'approve-i', 'approve2-i')
    AND log_timestamp > CONCAT(
      YEAR( DATE_SUB( NOW(), INTERVAL 30 DAY ) ),
      LPAD( MONTH( DATE_SUB( NOW(), INTERVAL 30 DAY ) ), 2, '0'),
      LPAD( DAY( DATE_SUB( NOW(), INTERVAL 30 DAY ) ), 2, '0'),
      '000000'
    )
    GROUP BY user_name
    ORDER BY review_cnt DESC
;
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...