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.

SQL

x
 
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);
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 (images_count * 0.05), 1
;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...