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
Muhammed taha
.
Toggle Highlighting
SQL
SELECT actor_name, SUM(IF( (log_type = 'delete'),1,0)) AS 'delete', SUM(IF( (log_type = 'protect'),1,0)) AS 'restore', SUM(IF( (log_type = 'block'),1,0)) AS 'event', SUM(IF( (log_type = 'merge'),1,0)) AS 'revision', SUM(IF( (log_type = 'rights'),1,0)) AS 'block', SUM(IF( (log_type = 'contentmodel'),1,0)) AS 'unblock', SUM(IF( log_type IN ('contentmodel', 'rights', 'merge', 'block', 'protect', 'delete'),1,0)) AS 'total' FROM logging INNER JOIN actor ON logging.log_actor = actor.actor_id WHERE log_type IS NOT NULL AND log_action IS NOT NULL AND actor_name IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'sysop') AND log_type IN ('block', 'delete', 'protect', 'rights', 'contentmodel', 'merge') AND log_action NOT IN ('delete_redir', 'autopromote') AND ucase (actor_name) not like ucase ("%BOT") collate utf8_general_ci AND actor_name NOT IN (SELECT user_name FROM user_groups INNER JOIN user ON user_id = ug_user WHERE ug_group = 'bot') GROUP BY actor_name 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...