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 the list of all articles in the category CREATE TEMPORARY TABLE temp_articles AS SELECT DISTINCT page_id, page_title FROM categorylinks WHERE cl_to = 'Critically_endangered_plants'; -- Step 2: Check for the images used in those articles CREATE TEMPORARY TABLE temp_article_images AS SELECT DISTINCT il_from, il_to FROM imagelinks WHERE il_from IN (SELECT page_id FROM temp_articles); -- Step 3: Get the templates used in the category CREATE TEMPORARY TABLE temp_category_templates AS SELECT DISTINCT tl_from FROM templatelinks WHERE tl_namespace = 10 -- Assuming template namespace is 10 AND tl_from IN (SELECT page_id FROM temp_articles); -- Step 4: Check for the images used in those templates CREATE TEMPORARY TABLE temp_template_images AS SELECT DISTINCT il_from, il_to FROM imagelinks WHERE il_from IN (SELECT tl_from FROM temp_category_templates); -- Step 5: Remove articles where the images match those used in the templates SELECT DISTINCT a.page_title, ai.il_to AS image_link FROM temp_articles a JOIN temp_article_images ai ON a.page_id = ai.il_from LEFT JOIN temp_category_templates ct ON a.page_id = ct.tl_from LEFT JOIN temp_template_images ti ON ct.tl_from = ti.il_from WHERE ti.il_from IS NULL;
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...