Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Users with CSS/JS/JSON edits on ruwiki
by
Jack who built the house
This query is marked as a draft
This query has been published
by
Jack who built the house
.
Toggle Highlighting
SQL
use ruwiki_p; SELECT actor_name, group_name, # IF (ug_group = 'sysop', 'admin', 'engineer') css, js, json, userscripts, (css + js + json + userscripts) total FROM ( SELECT actor_name, SUM(CASE WHEN ext = 'css' AND page_namespace = 8 THEN cnt ELSE 0 END) css, SUM(CASE WHEN ext = 'js' AND page_namespace = 8 THEN cnt ELSE 0 END) js, SUM(CASE WHEN ext = 'json' AND page_namespace = 8 THEN cnt ELSE 0 END) json, SUM(CASE WHEN page_namespace = 2 THEN cnt ELSE 0 END) userscripts FROM ( SELECT page_namespace, substr(regexp_substr(page_title, '\.(css|js|json)$'), 2) ext, actor_name, COUNT(*) cnt FROM page STRAIGHT_JOIN revision ON rev_page = page_id JOIN actor ON rev_actor = actor_id WHERE ( page_namespace = 8 OR page_namespace = 2 AND page_title NOT LIKE CONCAT(REPLACE(actor_name, ' ', '_'), '%') ) AND page_title RLIKE '^.*\.(css|js|json)$' GROUP BY actor_name, ext, page_namespace ) edits GROUP BY actor_name ) edits2 JOIN user ON user_name = actor_name JOIN user_groups ON (ug_group = 'sysop' OR ug_group = 'engineer') AND ug_user = user_id ORDER BY total 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...