Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
he.wiki old+new+uploader image GFDL files by upload date in cat
by
MGA73
This query is marked as a draft
This query has been published
by
Geagea
.
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" #WHERE # oi_name IS NOT NULL -- This line ensures only files with old versions are included -- exclude categories AND NOT EXISTS ( SELECT * FROM categorylinks AS sub_cl WHERE page_id = sub_cl.cl_from AND ( -- exclude yet in license sub_cl.cl_to = 'קבצים_בהתאם_לכללי_מדיניות_ישנים_לקבצים' OR sub_cl.cl_to = 'אין_להעביר_לוויקישיתוף' OR sub_cl.cl_to = 'תמונות_החשודות_בהפרת_זכויות_יוצרים' OR sub_cl.cl_to = 'ויקיפדיה_-_קבצים_עם_אישור' OR ) 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...