Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
جار الله
.
Toggle Highlighting
SQL
USE arwiki_p; SELECT user_name, user_id, SUM(IF( (log_type = 'delete' AND log_action != 'restore'),1,0)) AS 'delete', SUM(IF( (log_type = 'delete' AND log_action = 'restore'),1,0)) AS 'restore', SUM(IF( (log_type = 'block' AND log_action != 'unblock'),1,0)) AS 'block', SUM(IF( (log_type = 'block' AND log_action = 'unblock'),1,0)) AS 'unblock', SUM(IF( (log_type = 'protect' AND log_action != 'unprotect'),1,0)) AS 'protect', SUM(IF( (log_type = 'protect' AND log_action = 'unprotect'),1,0)) AS 'unprotect', SUM(IF( log_type = 'rights',1,0)) AS 'rights', SUM(IF( log_type = 'import',1,0)) AS 'import', SUM(IF( log_type != '',1,0)) AS 'total' FROM logging JOIN user ON user_id = log_user WHERE log_timestamp > 20180902000000 AND log_timestamp <= 20190302000000 AND log_type IS NOT NULL AND log_action IS NOT NULL AND log_type IN ('block', 'delete', 'protect', 'import', 'rights') AND log_action NOT IN ('delete_redir', 'autopromote', 'move_prot') AND user_name IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'sysop') AND ucase (user_name) not like ucase ("%BOT") collate utf8_general_ci AND user_name not like "بوت %" collate utf8_general_ci AND user_name not like "مرشح_الإساءة%" collate utf8_general_ci AND user_name NOT IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'bot'); GROUP BY user_name HAVING `total` > 0 ORDER BY 'total' DESC;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...