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
Ankry
.
Toggle Highlighting
SQL
use plwikisource_p; select user, css, js, css+js from (select user, 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, count(*) cnt from page straight_join revision on rev_page = page_id where page_namespace = 2 and page_title rlike '^.*\.(css|js|json)$' and page_title not rlike CONCAT('^',REPLACE(rev_user_text,' ','_')) group by user, ext) edits group by user) edits2 where css + js > 0 order by css + js desc; use sourceswiki_p; select user, css, js, css+js from (select user, 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, count(*) cnt from page straight_join revision on rev_page = page_id where page_namespace = 2 and page_title rlike '^.*\.(css|js|json)$' and page_title not rlike CONCAT('^',REPLACE(rev_user_text,' ','_')) group by user, ext) edits group by user) edits2 where css + js > 0 order by css + js desc; select user, css, js, css+js from (select user, 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, 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, ext) edits group by user) edits2 where css + js > 0 order by css + js 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...