SQL
x
USE fawiki_p;
SELECT REPLACE(concat('* [[',page_title,']]'),'_',' '), REPLACE(concat('[[',rd_title,']]'),'_',' '), MID(page_title,1,LOCATE('(ابهام',page_title)-2)
FROM page JOIN redirect ON page_id = rd_from
WHERE page_is_redirect = 1
AND page_namespace = 0
AND rd_namespace = 0
AND NOT (
LOWER(CONVERT(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(MID(page_title,1,LOCATE('(ابهام',page_title)-2),'آ','ا'),'هٔ','ه'),'ك','ک'),'ي','ی'),'•',''),'_','') USING utf8mb4)) = LOWER(CONVERT(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(rd_title,'آ','ا'),'هٔ','ه'),'ك','ک'),'ي','ی'),'•',''),'_','') USING utf8mb4))
OR LOWER(CONVERT(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(page_title,'آ','ا'),'هٔ','ه'),'ك','ک'),'ي','ی'),'•',''),'_',''),'0','۰'),'1','۱'),'2','۲'),'3','۳'),'4','۴'),'5','۵'),'6','۶'),'7','۷'),'8','۸'),'9','۹'),',','،') USING utf8mb4)) = LOWER(CONVERT(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(rd_title,'آ','ا'),'هٔ','ه'),'ك','ک'),'ي','ی'),'•',''),'_',''),'0','۰'),'1','۱'),'2','۲'),'3','۳'),'4','۴'),'5','۵'),'6','۶'),'7','۷'),'8','۸'),'9','۹'),',','،') USING utf8mb4))
)
LIMIT 100000;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.