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
Matma Rex
.
https://commons.wikimedia.org/wiki/Commons:Administrators'_noticeboard?oldid=199115948#AbuseFilter_for_cross-wiki_uploads
Toggle Highlighting
SQL
use commonswiki_p; select concat(major_mime, '/', minor_mime) as mime, case when width*height/1000000 < 10 then floor(width*height/200000)/5 when width*height/1000000 < 30 then floor(width*height/1000000) else floor(width*height/10000000)*10 end as mpx, sum(alive) as alive, count(*) - sum(alive) as dead from ( select -- log_id, log_title, log_user, (img_name is not null) as alive, -- substring(log_comment, 24) as source, -- coalesce(img_size, fa_size ) as size, coalesce(img_width, fa_width ) as width, coalesce(img_height, fa_height) as height, coalesce(img_major_mime, fa_major_mime) as major_mime, coalesce(img_minor_mime, fa_minor_mime) as minor_mime from logging join change_tag on log_id=ct_log_id left join image on img_name=log_title left join filearchive on fa_name=log_title where log_type='upload' and log_action='upload' and ct_tag='cross-wiki-upload' and (img_name is not null or fa_name is not null) ) t group by major_mime, minor_mime, case when width*height/1000000 < 10 then floor(width*height/200000)*200000 when width*height/1000000 < 30 then floor(width*height/1000000)*1000000 else floor(width*height/10000000)*10000000 end order by mime, mpx;
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...