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 user_name, SUM(CASE WHEN log_type = "delete" AND log_action NOT IN ("delete_redir", "restore") THEN 1 ELSE 0 END) AS delete_count, SUM(CASE WHEN log_type = "delete" AND log_action = "restore" THEN 1 ELSE 0 END) AS restore_count, SUM(CASE WHEN log_type = "delete" AND log_action = "revision" THEN 1 ELSE 0 END) AS revision_count, SUM(CASE WHEN log_type = "delete" AND log_action = "event" THEN 1 ELSE 0 END) AS event_count, SUM(CASE WHEN log_type = "protect" AND log_action IN ("modify", "protect") THEN 1 ELSE 0 END) AS protect_count, SUM(CASE WHEN log_type = "protect" AND log_action = "unprotect" THEN 1 ELSE 0 END) AS unprotect_count, SUM(CASE WHEN log_type = "protect" AND log_action = "modify" THEN 1 ELSE 0 END) AS modify_count, SUM(CASE WHEN log_type = "block" THEN 1 ELSE 0 END) AS block_count, SUM(CASE WHEN log_type = "block" AND log_action = "unblock" THEN 1 ELSE 0 END) AS unblock_count, SUM(CASE WHEN log_type = "block" AND log_action = "reblock" THEN 1 ELSE 0 END) AS reblock_count, SUM(CASE WHEN log_type = "rights" THEN 1 ELSE 0 END) AS rights_count FROM logging, user, actor, user_groups where actor_id = log_actor and user_id = ug_user AND actor_user = user_id AND ug_group = "sysop" AND user_name NOT IN ("مرشح الإساءة") GROUP BY user_name ORDER BY user_name ASC, delete_count DESC, restore_count DESC, revision_count DESC, event_count DESC, protect_count DESC, unprotect_count DESC, modify_count DESC, block_count DESC, unblock_count DESC, reblock_count DESC, rights_count 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...