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
Huji
.
Toggle Highlighting
SQL
use fawiki_p; select user_name, ifnull(del.cnt, 0), ifnull(res.cnt, 0), ifnull(revdel.cnt, 0), ifnull(logdel.cnt, 0), ifnull(prot.cnt, 0), ifnull(unprot.cnt, 0), ifnull(editprot.cnt, 0), ifnull(block.cnt, 0), ifnull(unblock.cnt, 0), ifnull(editblock.cnt, 0), ifnull(renames.cnt, 0), ifnull(rights.cnt, 0), (ifnull(del.cnt, 0) + ifnull(res.cnt, 0) + ifnull(revdel.cnt, 0) + ifnull(logdel.cnt, 0) + ifnull(prot.cnt, 0) + ifnull(unprot.cnt, 0) + ifnull(editprot.cnt, 0) + ifnull(block.cnt, 0) + ifnull(unblock.cnt, 0) + ifnull(editblock.cnt, 0) + ifnull(renames.cnt, 0) + ifnull(rights.cnt, 0)) tot from user left join (select log_user, count(log_id) cnt from logging where log_type = 'delete' and log_action='delete' group by log_user) del on user_id = del.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'delete' and log_action='restore' group by log_user) res on user_id = res.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'delete' and log_action='revision' group by log_user) revdel on user_id = revdel.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'delete' and log_action = 'event' group by log_user) logdel on user_id = logdel.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'protect' and log_action = 'protect' group by log_user) prot on user_id = prot.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'protect' and log_action = 'unprotect' group by log_user) unprot on user_id = unprot.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'protect' and log_action = 'modify' group by log_user) editprot on user_id = editprot.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'block' and log_action = 'block' group by log_user) block on user_id = block.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'block' and log_action = 'unblock' group by log_user) unblock on user_id = unblock.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'block' and log_action = 'reblock' group by log_user) editblock on user_id = editblock.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'renameuser' group by log_user) renames on user_id = renames.log_user left join (select log_user, count(log_id) cnt from logging where log_type = 'rights' group by log_user) rights on user_id = rights.log_user order by tot 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...