SQL
AخA
USE fawiki_p;
SELECT REPLACE(pg.page_title,'_',' ') article, REPLACE(rd.page_title,'_',' ') link_to_be_replaced, REPLACE(rd_title,'_',' ') replacement, COUNT(rd.page_title)
FROM page AS rd JOIN redirect ON rd_from = rd.page_id JOIN pagelinks ON pl_title = rd.page_title JOIN page AS pg ON pl_from = pg.page_id
WHERE rd.page_namespace = 0
AND rd.page_is_redirect = 1
AND rd.page_title LIKE "%(فیلم)"
AND rd_namespace = 0
AND rd_title LIKE "%(فیلم\_%"
AND MID(rd_title,1,LOCATE('(فیلم',rd_title)-2) = MID(rd.page_title,1,LOCATE('(فیلم',rd.page_title)-2)
AND pl_from_namespace = 0
AND pl_namespace = 0
AND pg.page_namespace = 0
AND pg.page_is_redirect = 0
GROUP BY rd.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.
All SQL code is licensed under CC0 License.