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 CONCAT ('* [[:en:',l1.ll_title,']] [[',p1.page_title,']] , '), MID(l1.ll_title,1,LOCATE(',',l1.ll_title)-1), MID(p1.page_title,1,LOCATE('،',p1.page_title)-1) FROM page AS p1 JOIN langlinks AS l1 ON p1.page_id = l1.ll_from WHERE p1.page_namespace = 0 AND p1.page_is_redirect = 0 AND l1.ll_lang = "en" AND l1.ll_title LIKE "%,%" AND ( p1.page_title LIKE "%،%" # OR page_title LIKE "%)%" ) /* AND EXISTS ( SELECT null FROM page AS p2 JOIN langlinks AS l2 ON p2.page_id = l2.ll_from WHERE p2.page_namespace = 0 AND p2.page_is_redirect = 0 AND l2.ll_lang = "en" AND l2.ll_title LIKE "%,%" AND ( p2.page_title LIKE "%،%" # OR page_title LIKE "%)%" ) AND MID(l1.ll_title,1,LOCATE(',',l1.ll_title)-1) = MID(l2.ll_title,1,LOCATE(',',l2.ll_title)-1) AND MID(p1.page_title,1,LOCATE('،',p1.page_title)-1) <> MID(p2.page_title,1,LOCATE('،',p2.page_title)-1) ) */ AND MID(p1.page_title,1,LOCATE('،',p1.page_title)-1) IN ( SELECT MID(p2.page_title,1,LOCATE('،',p2.page_title)-1) FROM page AS p2 JOIN langlinks AS l2 ON p2.page_id = l2.ll_from WHERE p2.page_namespace = 0 AND p2.page_is_redirect = 0 AND l2.ll_lang = "en" AND l2.ll_title LIKE "%,%" AND ( p2.page_title LIKE "%،%" # OR page_title LIKE "%)%" ) AND MID(l1.ll_title,1,LOCATE(',',l1.ll_title)-1) = MID(l2.ll_title,1,LOCATE(',',l2.ll_title)-1) ) #GROUP BY MID(page_title,1,LOCATE('،',page_title)-1)# HAVING COUNT(MID(ll_title,1,LOCATE(',',ll_title)-1)) > 1 #GROUP BY p1.page_title #ORDER BY MID(l1.ll_title,1,LOCATE(',',l1.ll_title)-1); 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...