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
SELECT DISTINCT log_type, log_action FROM logging ORDER BY log_type, log_action; WITH Admins AS (SELECT user_name, user_id FROM user JOIN user_groups ON user_id = ug_user WHERE ug_group = 'sysop'), AdminLogs AS (SELECT log_type, log_action, actor_user FROM logging JOIN actor ON actor_id = log_actor WHERE actor_user IN (SELECT admins.user_id FROM Admins AS admins) AND log_timestamp >= DATE_FORMAT(CURDATE() - INTERVAL 6 MONTH, '%Y%m%d%H%i%S')) SELECT user_name, (SELECT count(*) FROM AdminLogs WHERE log_type = 'block' AND log_action = 'NULL' AND actor_user = user_id) blockNULL, (SELECT count(*) FROM AdminLogs WHERE log_type = 'create' AND log_action = 'NULL' AND actor_user = user_id) createNULL, (SELECT count(*) FROM AdminLogs WHERE log_type = 'delete' AND log_action = 'NULL' AND actor_user = user_id) deleteNULL, (SELECT count(*) FROM AdminLogs WHERE log_type = 'newusers' AND log_action = 'NULL' AND actor_user = user_id) newusersNULL, (SELECT count(*) FROM AdminLogs WHERE log_type = 'protect' AND log_action = 'NULL' AND actor_user = user_id) protectNULL, (SELECT count(*) FROM AdminLogs WHERE log_type = 'managetags' AND log_action = 'activate' AND actor_user = user_id) managetagsactivate, (SELECT count(*) FROM AdminLogs WHERE log_type = 'growthexperiments' AND log_action = 'addlink' AND actor_user = user_id) growthexperimentsaddlink, (SELECT count(*) FROM AdminLogs WHERE log_type = 'newusers' AND log_action = 'autocreate' AND actor_user = user_id) newusersautocreate, (SELECT count(*) FROM AdminLogs WHERE log_type = 'block' AND log_action = 'block' AND actor_user = user_id) blockblock, (SELECT count(*) FROM AdminLogs WHERE log_type = 'newusers' AND log_action = 'byemail' AND actor_user = user_id) newusersbyemail, (SELECT count(*) FROM AdminLogs WHERE log_type = 'contentmodel' AND log_action = 'change' AND actor_user = user_id) contentmodelchange, (SELECT count(*) FROM AdminLogs WHERE log_type = 'abusefilter' AND log_action = 'create' AND actor_user = user_id) abusefiltercreate, (SELECT count(*) FROM AdminLogs WHERE log_type = 'create' AND log_action = 'create' AND actor_user = user_id) createcreate, (SELECT count(*) FROM AdminLogs WHERE log_type = 'managetags' AND log_action = 'create' AND actor_user = user_id) 'managetags\ncreate', (SELECT count(*) FROM AdminLogs WHERE log_type = 'newusers' AND log_action = 'create' AND actor_user = user_id) newuserscreate, (SELECT count(*) FROM AdminLogs WHERE log_type = 'newusers' AND log_action = 'create2' AND actor_user = user_id) newuserscreate2, (SELECT count(*) FROM AdminLogs WHERE log_type = 'delete' AND log_action = 'delete' AND actor_user = user_id) deletedelete, (SELECT count(*) FROM AdminLogs WHERE log_type = 'managetags' AND log_action = 'delete' AND actor_user = user_id) managetagsdelete, (SELECT count(*) FROM AdminLogs WHERE log_type = 'delete' AND log_action = 'delete_redir' AND actor_user = user_id) deletedelete_redir, (SELECT count(*) FROM AdminLogs WHERE log_type = 'delete' AND log_action = 'event' AND actor_user = user_id) deleteevent, (SELECT count(*) FROM AdminLogs WHERE log_type = 'massmessage' AND log_action = 'failure' AND actor_user = user_id) massmessagefailure, (SELECT count(*) FROM AdminLogs WHERE log_type = 'gblblock' AND log_action = 'gblock2' AND actor_user = user_id) gblblockgblock2, (SELECT count(*) FROM AdminLogs WHERE log_type = 'spamblacklist' AND log_action = 'hit' AND actor_user = user_id) spamblacklisthit, (SELECT count(*) FROM AdminLogs WHERE log_type = 'merge' AND log_action = 'merge' AND actor_user = user_id) mergemerge, (SELECT count(*) FROM AdminLogs WHERE log_type = 'abusefilter' AND log_action = 'modify' AND actor_user = user_id) abusefiltermodify, (SELECT count(*) FROM AdminLogs WHERE log_type = 'protect' AND log_action = 'modify' AND actor_user = user_id) protectmodify, (SELECT count(*) FROM AdminLogs WHERE log_type = 'move' AND log_action = 'move' AND actor_user = user_id) movemove, (SELECT count(*) FROM AdminLogs WHERE log_type = 'protect' AND log_action = 'move_prot' AND actor_user = user_id) protectmove_prot, (SELECT count(*) FROM AdminLogs WHERE log_type = 'move' AND log_action = 'move_redir' AND actor_user = user_id) movemove_redir, (SELECT count(*) FROM AdminLogs WHERE log_type = 'contentmodel' AND log_action = 'new' AND actor_user = user_id) contentmodelnew, (SELECT count(*) FROM AdminLogs WHERE log_type = 'newusers' AND log_action = 'newusers' AND actor_user = user_id) newusersnewusers, (SELECT count(*) FROM AdminLogs WHERE log_type = 'upload' AND log_action = 'overwrite' AND actor_user = user_id) uploadoverwrite, (SELECT count(*) FROM AdminLogs WHERE log_type = 'patrol' AND log_action = 'patrol' AND actor_user = user_id) patrolpatrol, (SELECT count(*) FROM AdminLogs WHERE log_type = 'protect' AND log_action = 'protect' AND actor_user = user_id) protectprotect, (SELECT count(*) FROM AdminLogs WHERE log_type = 'block' AND log_action = 'reblock' AND actor_user = user_id) blockreblock, (SELECT count(*) FROM AdminLogs WHERE log_type = 'renameuser' AND log_action = 'renameuser' AND actor_user = user_id) renameuserrenameuser, (SELECT count(*) FROM AdminLogs WHERE log_type = 'timedmediahandler' AND log_action = 'resettranscode' AND actor_user = user_id) timedmediahandlerresettranscode, (SELECT count(*) FROM AdminLogs WHERE log_type = 'delete' AND log_action = 'restore' AND actor_user = user_id) deleterestore, (SELECT count(*) FROM AdminLogs WHERE log_type = 'upload' AND log_action = 'revert' AND actor_user = user_id) uploadrevert, (SELECT count(*) FROM AdminLogs WHERE log_type = 'delete' AND log_action = 'revision' AND actor_user = user_id) deleterevision, (SELECT count(*) FROM AdminLogs WHERE log_type = 'rights' AND log_action = 'rights' AND actor_user = user_id) rightsrights, (SELECT count(*) FROM AdminLogs WHERE log_type = 'growthexperiments' AND log_action = 'setmentor' AND actor_user = user_id) growthexperimentssetmentor, (SELECT count(*) FROM AdminLogs WHERE log_type = 'massmessage' AND log_action = 'skipbadns' AND actor_user = user_id) massmessageskipbadns, (SELECT count(*) FROM AdminLogs WHERE log_type = 'massmessage' AND log_action = 'skipnouser' AND actor_user = user_id) massmessageskipnouser, (SELECT count(*) FROM AdminLogs WHERE log_type = 'thanks' AND log_action = 'thank' AND actor_user = user_id) thanksthank, (SELECT count(*) FROM AdminLogs WHERE log_type = 'block' AND log_action = 'unblock' AND actor_user = user_id) blockunblock, (SELECT count(*) FROM AdminLogs WHERE log_type = 'protect' AND log_action = 'unprotect' AND actor_user = user_id) protectunprotect, (SELECT count(*) FROM AdminLogs WHERE log_type = 'tag' AND log_action = 'update' AND actor_user = user_id) tagupdate, (SELECT count(*) FROM AdminLogs WHERE log_type = 'upload' AND log_action = 'upload' AND actor_user = user_id) uploadupload, (SELECT count(*) FROM AdminLogs WHERE log_type = 'gblblock' AND log_action = 'whitelist' AND actor_user = user_id) gblblockwhitelist FROM Admins; SELECT user_name, user_id FROM user JOIN user_groups ON user_id = ug_user WHERE ug_group = 'sysop' #SELECT DISTINCT log_action #FROM hywiki_p.logging
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...