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
Saeidpourbabak
.
Toggle Highlighting
SQL
USE fawiki_p; SELECT DISTINCT REPLACE(page_title,'_',' '),MID(page_title,1,LOCATE('(',cl_to)-2)#,cl_to,MID(page_title,1,LOCATE('(',page_title)-2),MID(cl_to,LOCATE('شهرستان',cl_to)+15,LENGTH(cl_to)) FROM page JOIN categorylinks AS frst ON frst.cl_from = page_id WHERE page_namespace=0 #AND page_title LIKE "%)%" AND frst.cl_to LIKE 'شهرهای_استان%' AND EXISTS ( SELECT null FROM page JOIN categorylinks AS scnd ON scnd.cl_from = page_id WHERE page_namespace=0 AND scnd.cl_to LIKE 'شهرهای_استان%' AND MID(page_title,1,LOCATE('(',frst.cl_to)-2) <> MID(page_title,1,LOCATE('(',scnd.cl_to)-2) ) #AND MID(page_title,1,LOCATE('(',page_title)-2) = MID(cl_to,LOCATE('شهرستان',cl_to)+15,LENGTH(cl_to)) ORDER BY page_title;
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...