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