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_Bethel_University" OR cl_to = "Media_contributed_by_the_Blue_Earth_County_Historical_Society" OR cl_to = "Media_contributed_by_Carleton_College" OR cl_to = "Media_contributed_by_Hennepin_County_Library" OR cl_to = "Media_contributed_by_Minitex" OR cl_to = "Media_contributed_by_Minnesota_State_University,_Mankato" OR cl_to = "Media_contributed_by_Nicollet_County_Historical_Society" OR cl_to = "Media_contributed_by_Norwegian-American_Historical_Association" OR cl_to = "Media_contributed_by_Saint_Paul_Public_Library" OR cl_to = "Media_contributed_by_St._Cloud_State_University" OR cl_to = "Media_contributed_by_Stillwater_Public_Library" OR cl_to = "Media_contributed_by_Weavers_Guild_of_Minnesota" OR cl_to = "Media_contributed_by_South_Dakota_State_University" OR cl_to = "Media_contributed_by_University_of_South_Dakota" 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...