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
Dispenser
.
http://commons.wikimedia.org/wiki/User:Dispenser/Double_extension http://quarry.wmflabs.org/query/889
Toggle Highlighting
SQL
-- 2> /dev/null; date; echo ' /* Double file extensions * License: Public Domain * Run time: 20 minutes <SLOW_OK> */ USE commonswiki_p; SELECT CONCAT("* {{/link|File:", REPLACE(REPLACE(page_title, "_", " "), "=", "="), "}}") AS Filename FROM page WHERE page_namespace=6 AND page_is_redirect=0 AND CONVERT(page_title USING utf8) REGEXP "\\.(djvu|gif|jpeg|jpg|flac|mid|wav|ogg|oga|ogv|pdf|png|svg|tif[^f]|tiff|xcf|webm)." AND CONVERT(page_title USING utf8) NOT REGEXP "/|\\.webm[sh]d\\.webm$|\\.oggtheora\\.og[agv]$|\\.oggvorbis\\.ogg$" ORDER BY /* .TIFFany at bottom */ CONVERT(page_title USING utf8) REGEXP "\\.(djvu|gif|jpe?g|flac|mid|wav|og[agv]|pdf|png|svg|tiff?|xcf|webm)[^[:alpha:]]" DESC, /* .svg.png or .jpeg.jpg at top */ page_title REGEXP "\\.[[:alpha:]]{3,4}\\.[[:alpha:]]{3,4}$" DESC, /* Separate R0012131.JPG (8332852801).jpg */ LENGTH(page_title)>24 AND LOCATE(".", REVERSE(page_title), 6) > 16, /* ASCIIbetical sort */ BINARY page_title ;-- ' | sql commonswiki_p > ~/public_html/logs/dblextension.txt; date;
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...