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
XXN
.
Toggle Highlighting
SQL
USE enwiki_p; SELECT img_name, img_size, img_timestamp, img_user_text, img_sha1, IF(img_minor_mime="jpeg", 3, /* Workaround for [[phab:T132986]] */ IF(img_bits<8, 1, IF(img_metadata LIKE "%s:10:\"truecolour\"%", 3, 4)) * img_bits / 8 ) * img_width * img_height + IFNULL(fo_size, 16*1024) AS est_size FROM image JOIN page ON page_namespace=6 AND page_title=img_name LEFT JOIN u2815__.file_overhead ON fo_page=page_id /* magic overhead */ #LEFT JOIN categorylinks ON cl_from=page_id AND cl_to IN ("Fireworks_PNG_files", "Picture_It!_files") WHERE /*cl_from IS NULL AND*/ img_media_type="BITMAP" AND img_major_mime="image" AND img_minor_mime IN ("jpeg", "png") AND (img_metadata NOT LIKE "%frameCount\";i:%" /* [[Category:Animated PNG]] */ OR img_metadata LIKE "%frameCount\";i:0;%") HAVING img_size > est_size /* Worst offender by absolute size; works better than percentages */ ORDER BY cast(img_size as signed) - est_size 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...