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
Yamaha5
.
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 JOIN user_groups ON user_id = ug_user AND ug_group = 'sysop' LEFT JOIN ( SELECT log_user, COUNT(log_id) cnt FROM logging WHERE log_type = 'delete' AND log_action='delete' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' and log_timestamp > 20171200000000 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' AND log_action = 'rights' and log_timestamp > 20171200000000 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...