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
Dominic
.
Toggle Highlighting
SQL
SELECT REPLACE(REPLACE(REPLACE(cl_to, "_", " "), "Media contributed by the ", ""), "Media contributed by ", "") AS "Institution", FORMAT(COUNT(img_name), 'N0') AS "File count", FORMAT(COUNT(DISTINCT REGEXP_REPLACE(REGEXP_REPLACE(img_name, '^.*DPLA_-_', ''), '[\.|_].*$', '')), 'N0') AS "Item count", ROUND(SUM(img_size/(1<<30))) AS "Size (GB)" FROM page JOIN image ON page_title = img_name JOIN categorylinks ON page_id = cl_from WHERE cl_to = "Media_contributed_by_Indiana_Memory" OR cl_to = "Media_contributed_by_Benjamin_Harrison_Presidential_Site" OR cl_to = "Media_contributed_by_Conner_Prairie" OR cl_to = "Media_contributed_by_Hett_Art_Gallery_&_Museum" OR cl_to = "Media_contributed_by_Indiana_State_Library_and_Historical_Bureau" OR cl_to = "Media_contributed_by_Emmerich_Manual_High_School" OR cl_to = "Media_contributed_by_Hamilton_County" OR cl_to = "Media_contributed_by_Indiana_State_Archives" OR cl_to = "Media_contributed_by_Indiana_University Libraries" OR cl_to = "Media_contributed_by_Irvington_Historical_Society" OR cl_to = "Media_contributed_by_James_Whitcomb_Riley_Museum_Home" OR cl_to = "Media_contributed_by_Library_of_Congress" OR cl_to = "Media_contributed_by_Library_of_Congress_Prints_and_Photographs_Division" OR cl_to = "Media_contributed_by_Riley_Birthplace_and_Museum" OR cl_to = "Media_contributed_by_Ruth_Lilly_Special_Collections_and_Archives" OR cl_to = "Media_contributed_by_the_Indiana_Historical_Society" GROUP BY(cl_to) ORDER BY(COUNT(img_name)) 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...