Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
File size stats for Wiki Loves Monuments 2016 in France
by
Ash Crow
This query is marked as a draft
This query has been published
by
Envlh
.
This script returns the image that is the 5% tiniest (in surface area) from WLM 2016 in France.
Toggle Highlighting
SQL
USE commonswiki_p; SET @images_count = (SELECT COUNT(*) FROM image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND image.img_name = page.page_title AND categorylinks.cl_to = 'Images_from_Wiki_Loves_Monuments_2016_in_France' ); #SET @percent_5 = (@images_count * 0.05); PREPARE STMT FROM 'SELECT * FROM image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND image.img_name = page.page_title AND categorylinks.cl_to = 'Images_from_Wiki_Loves_Monuments_2016_in_France' ORDER BY (image.img_width * image.img_height) ASC LIMIT ?, 1 ;'; EXECUTE STMT USING (@images_count * 0.05);
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...