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
Patsagorn Y.
.
Toggle Highlighting
SQL
SELECT actor_name AS `username`, SUM( IF( ( log_type IN (delete, delete) AND log_action IN (delete, delete) ), 1, 0 ) ) AS delete, SUM( IF( ( log_type IN (delete, delete) AND log_action IN (revision, revision) ), 1, 0 ) ) AS revision - delete, SUM( IF( ( log_type IN (delete, delete) AND log_action IN (event, event) ), 1, 0 ) ) AS log - delete, SUM( IF( ( log_type IN (delete, delete) AND log_action IN (restore, restore) ), 1, 0 ) ) AS restore, SUM( IF( ( log_type IN (block, block, block, block) AND log_action IN (block, reblock, block, reblock) ), 1, 0 ) ) AS reblock, SUM( IF( ( log_type IN (block, block) AND log_action IN (unblock, unblock) ), 1, 0 ) ) AS unblock, SUM( IF( ( log_type IN ( protect, protect, stable, stable, protect, protect, stable, stable ) AND log_action IN ( protect, modify, config, modify, protect, modify, config, modify ) ), 1, 0 ) ) AS reprotect, SUM( IF( ( log_type IN (protect, protect) AND log_action IN (unprotect, unprotect) ), 1, 0 ) ) AS unprotect, SUM( IF( ( log_type IN (rights, rights) AND log_action IN (rights, rights) ), 1, 0 ) ) AS rights, SUM( IF( ( log_type IN (merge, merge) AND log_action IN (merge, merge) ), 1, 0 ) ) AS merge, SUM( IF( ( log_type IN (import, import, import, import) AND log_action IN ( interwiki, upload, interwiki, upload ) ), 1, 0 ) ) AS import, SUM( IF( ( log_type IN ( abusefilter, abusefilter, abusefilter, abusefilter ) AND log_action IN (modify, create, modify, create) ), 1, 0 ) ) AS abusefilter, SUM( IF( ( log_type IN ( contentmodel, contentmodel, contentmodel, contentmodel ) AND log_action IN (change, new, change, new) ), 1, 0 ) ) AS contentmodel, SUM( IF( log_type != '' AND log_action != '', 1, 0 ) ) AS `total` FROM logging JOIN actor ON log_actor = actor_id WHERE log_type IN ( delete, delete, delete, delete, block, block, block, protect, protect, stable, stable, protect, rights, merge, import, import, abusefilter, abusefilter, contentmodel, contentmodel ) AND log_action IN ( delete, revision, event, restore, block, reblock, unblock, protect, modify, config, modify, unprotect, rights, merge, interwiki, upload, modify, create, change, new ) GROUP BY actor_name HAVING `total` > 0
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...