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
Tgr
.
Toggle Highlighting
SQL
use ruwiki_p; SELECT user_name, IF (ug_group = 'sysop', 'admin', 'engineer') group_name, css, js, json FROM ( SELECT user_name, SUM(CASE WHEN ext = 'css' THEN cnt ELSE 0 END) css, SUM(CASE WHEN ext = 'js' THEN cnt ELSE 0 END) js, SUM(CASE WHEN ext = 'json' THEN cnt ELSE 0 END) json FROM ( SELECT substr(regexp_substr(page_title, '\.(css|js|json)$'), 2) ext, rev_user_text user_name, COUNT(*) cnt FROM page STRAIGHT_JOIN revision ON rev_page = page_id WHERE page_namespace = 8 AND page_title RLIKE '^.*\.(css|js|json)$' GROUP BY user_name, ext ) edits GROUP BY user_name ) edits2 JOIN user ON user_name = user_name JOIN user_groups ON (ug_group = 'sysop' OR ug_group = 'engineer') AND ug_user = user_id ORDER BY css + js + json 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...