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
.
Toggle Highlighting
SQL
/* Newbie Commons Videos * * Author: Dispenser * License: Public domain */ USE commonswiki_p; SELECT RPAD(CONCAT("[[File:", REPLACE(img_name, "_", " "), "]]"), 155, " ") AS "File", ROUND(img_size/1024/1024) AS "MB", /* Technically MiB */ IF(img_width=0, "", CONCAT(img_width, "x", img_height)) AS "Size", /*Dimensions*/ /* Get playtime_seconds from serialized PHP, convert to time, and format it */ TIME_FORMAT(SEC_TO_TIME(CONVERT( SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(img_metadata, "\"playtime_seconds\";d:", -1), "\"length\";d:", -1), ";", 1), INTEGER)),'%k:%i:%s') AS "Length", /* Run time */ CONCAT(img_user_text, " [", user_editcount, "]") AS "Uploader", CONCAT(DATEDIFF(NOW(), user_registration), " days ago") AS "Registered", LEFT(img_description,50) AS "Description" FROM image JOIN user ON user_id=img_user WHERE (user_editcount<100 AND user_registration > NOW() - INTERVAL 3 MONTH) AND img_media_type IN ("VIDEO", "AUDIO") AND img_size > 1e6 /* 1 MB minimum */ ORDER BY img_timestamp DESC LIMIT 240;
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...