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
Matěj Suchánek
.
Toggle Highlighting
SQL
USE cswiki_p; #SELECT * FROM ( SELECT DISTINCT page_title, SUBSTRING_INDEX(page_title, '_(', 1) AS title, 1 AS page_exists FROM page WHERE page_namespace = 0 AND page_title LIKE '%&_(film)' ESCAPE '&' UNION SELECT DISTINCT pl_title, SUBSTRING_INDEX(pl_title, '_(', 1) AS title, IF(page_title IS NULL, 0, 1) AS page_exists FROM pagelinks LEFT JOIN page ON page_title = pl_title AND page_namespace = pl_namespace WHERE pl_namespace = 0 AND pl_title LIKE '%&_(film)' ESCAPE '&' LIMIT 100; #) AS simple, ( SELECT DISTINCT page_title, SUBSTRING_INDEX(page_title, '_(', 1) AS title, 1 AS page_exists FROM page WHERE page_namespace = 0 AND page_title LIKE '%&_(film,&_%)' ESCAPE '&' UNION SELECT DISTINCT pl_title, SUBSTRING_INDEX(pl_title, '_(', 1) AS title, IF(page_title IS NULL, 0, 1) AS page_exists FROM pagelinks LEFT JOIN page ON page_title = pl_title AND page_namespace = pl_namespace WHERE pl_namespace = 0 AND pl_title LIKE '%&_(film,&_%)' ESCAPE '&' LIMIT 100; #) AS complex #WHERE simple.title = complex.title #LIMIT 10;
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...