Fork of Untitled query #31825 by Yamaha5
This query is marked as a draft This query has been published by Yamaha5.

SQL

AخA
 
use fawiki_p;
select  
    left(log_timestamp,6) AS DAY,
    COUNT(log_timestamp) AS ACTIONS
FROM user JOIN  logging ON  log_user=user_id
JOIN  user_groups  ON user_id = ug_user AND ug_group = 'eliminator'
-- JOIN  user_groups  ON user_id = ug_user AND ug_group = 'eliminator'
-- join  user_former_groups on ufg_user = log_user and ufg_group = 'eliminator'
WHERE
      log_user_text not in ('پالایهٔ_خرابکاری','Dexbot','Rezabot','Amirobot') and 
      ((log_type = 'protect'
      AND log_action = 'protect')
        OR
      (log_type = 'protect'
      AND log_action = 'unprotect')
        OR
      (log_type = 'protect'
      AND log_action = 'modify')
        OR
      (log_type = 'block'
      AND log_action = 'block')
        OR
      (log_type = 'block'
      AND log_action = 'unblock')
        OR
      (log_type = 'block'
       AND log_action = 'reblock'))
  GROUP BY left(log_timestamp,6)
  ORDER BY DAY;
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...