Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Malayalam Wikipedia Articles without images
by
Gnoeee
This query is marked as a draft
This query has been published
by
Gnoeee
.
Toggle Highlighting
SQL
-- Step 1: Get articles from the category CREATE TEMPORARY TABLE temp_articles AS SELECT DISTINCT page.page_id, page.page_title FROM page INNER JOIN categorylinks ON page.page_id = categorylinks.cl_from WHERE page.page_namespace = 0 AND page.page_is_redirect = 0 AND categorylinks.cl_to = 'Critically_endangered_plants'; -- Step 2: Get images used in each article CREATE TEMPORARY TABLE temp_images AS SELECT DISTINCT page_id, il_to AS image_link FROM imagelinks WHERE il_from_namespace = 0 AND il_to_namespace = 6 AND il_from IN (SELECT page_id FROM temp_articles); -- Step 3: Filter out images used indirectly through templates SELECT DISTINCT a.page_title, i.image_link FROM temp_articles a INNER JOIN temp_images i ON a.page_id = i.page_id WHERE NOT EXISTS ( SELECT 1 FROM templatelinks WHERE tl_from = a.page_id );
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...