Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
de.wikibooks GFDL files by upload date in cat
by
MGA73
This query is marked as a draft
This query has been published
by
MGA73
.
Toggle Highlighting
SQL
-- Query to get original upload date from the image and oldimage tables SELECT CONCAT("# [[:File:", page_title, "]]") as File, MIN(oi_timestamp) as oldest_old_version_date, MAX(img_timestamp) as latest_version_date, (SELECT actor_name FROM actor_image ai JOIN oldimage oi ON ai.actor_id = oi.oi_actor WHERE oi.oi_name = page.page_title ORDER BY oi.oi_timestamp ASC LIMIT 1) as original_uploader, (SELECT actor_name FROM actor_image ai JOIN image img ON ai.actor_id = img.img_actor WHERE img.img_name = page.page_title ORDER BY img.img_timestamp DESC LIMIT 1) as latest_uploader FROM page LEFT JOIN oldimage ON page.page_title = oi_name AND page.page_namespace = 6 AND oi_deleted = 0 LEFT JOIN image ON page.page_title = img_name AND page_namespace = 6 JOIN templatelinks ON tl_from = page_id JOIN categorylinks ON cl_from = page_id AND cl_type = "file" AND cl_to = "GFDL-Bild" #WHERE # oi_name IS NOT NULL -- This line ensures only files with old versions are included GROUP BY page_title;
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...