Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
ruwiki: Users with CSS/JS/JSON edits. 29 January 2020
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, css, js, userscripts, (css + js + 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)$'), 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)$' GROUP BY actor_name, ext, page_namespace ) edits GROUP BY actor_name ) edits2 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...