Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Find all images on commons that are using the WLE2017 template
by
Effeietsanders
This query is marked as a draft
This query has been published
by
Effeietsanders
.
Toggle Highlighting
SQL
USE commonswiki_p; SELECT page_title AS title, page_id AS page_id, page_title AS filename, img_timestamp AS timestamp FROM page, /* for host page, primary is page_id */ templatelinks, /* to identify where template is used, primary is tl_from which equals page_id */ image /* to find upload date, primary is img_name which equals page_title */ WHERE page_id = tl_from AND /* host page includes the template */ tl_namespace = 10 AND /* template is in the template namespace */ tl_from_namespace = 6 AND /* host page is in the file namespace */ tl_title = 'Wiki_Loves_Earth_2017' AND /* template in use */ page_title = img_name AND /* to find the files in the image table */ (img_timestamp < 20170430140000 OR /* uploaded before first country started, 14:00 UTC 30 April */ img_timestamp > 20170701070000); /* or uploaded after the last country finished, 07:00 UTC 1 July */
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...