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
Zhuyifei1999
.
Toggle Highlighting
SQL
USE commonswiki_p; SELECT DISTINCT img_name FROM externallinks INNER JOIN page ON page_id = el_FROM INNER JOIN image ON img_name = page_title WHERE page_namespace = 6 AND ( el_to LIKE 'http://youtube.com/watch%' OR el_to LIKE 'http://www.youtube.com/watch%' OR el_to LIKE 'http://m.youtube.com/watch%' OR el_to LIKE 'http://youtu.be/%' OR el_to LIKE 'https://youtube.com/watch%' OR el_to LIKE 'https://www.youtube.com/watch%' OR el_to LIKE 'https://m.youtube.com/watch%' OR el_to LIKE 'https://youtu.be/%' ) AND img_media_type IN ('AUDIO', 'VIDEO') ; SELECT DISTINCT img_name FROM externallinks INNER JOIN page ON page_id = el_FROM INNER JOIN image ON img_name = page_title WHERE page_namespace = 6 AND ( el_to LIKE 'http://youtube.com/watch%' OR el_to LIKE 'http://www.youtube.com/watch%' OR el_to LIKE 'http://m.youtube.com/watch%' OR el_to LIKE 'http://youtu.be/%' OR el_to LIKE 'https://youtube.com/watch%' OR el_to LIKE 'https://www.youtube.com/watch%' OR el_to LIKE 'https://m.youtube.com/watch%' OR el_to LIKE 'https://youtu.be/%' ) AND img_media_type IN ('AUDIO', 'VIDEO') AND img_name IN ( SELECT gil_to FROM globalimagelinks WHERE gil_wiki != 'commonswiki' AND gil_page_namespace_id = 0 ) ; SELECT DISTINCT img_name FROM externallinks INNER JOIN page ON page_id = el_FROM INNER JOIN image ON img_name = page_title WHERE page_namespace = 6 AND ( el_to LIKE 'http://youtube.com/watch%' OR el_to LIKE 'http://www.youtube.com/watch%' OR el_to LIKE 'http://m.youtube.com/watch%' OR el_to LIKE 'http://youtu.be/%' OR el_to LIKE 'https://youtube.com/watch%' OR el_to LIKE 'https://www.youtube.com/watch%' OR el_to LIKE 'https://m.youtube.com/watch%' OR el_to LIKE 'https://youtu.be/%' ) AND img_media_type IN ('AUDIO', 'VIDEO') AND img_name IN ( SELECT gil_to FROM globalimagelinks WHERE gil_wiki != 'commonswiki' AND gil_page_namespace_id = 0 ) AND page_id IN ( SELECT tl_from FROM templatelinks WHERE tl_namespace = 10 AND tl_title IN ('Cc-by-layout', 'Cc-by-sa-layout') ) ;
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...