Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
HakanIST
.
Toggle Highlighting
SQL
USE commonswiki_p; SELECT img.img_name AS ExtractedFile, tl_title AS OriginalFileTemplate, REPLACE(tl_title, '_', ' ') AS OriginalFileName, CASE WHEN EXISTS ( SELECT 1 FROM image AS original_img WHERE original_img.img_name = tl_title ) THEN 'Exists' ELSE 'Deleted' END AS OriginalFileStatus FROM image AS img JOIN templatelinks AS tl ON img.img_name = tl.tl_from WHERE tl.tl_namespace = 10 -- Template namespace AND tl.tl_title LIKE 'Extracted_from%' AND NOT EXISTS ( SELECT 1 FROM image AS original_img WHERE original_img.img_name = tl.tl_title ) LIMIT 100;
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...