SQL
x
USE fawiki_p;
SELECT concat('# [[',REPLACE(pl_title,'_',' '),']]')
FROM pagelinks JOIN page ON page_id = pl_from
WHERE page_title = REPLACE('ویکی•پروژه تقسیمات کشوری ایران/فاز دوم/برای انجام ۰۰۹',' ','_')
AND page_namespace = 4
#WHERE pl_from = 3855658 # page_id
AND pl_title LIKE 'بخش%'
AND EXISTS (
#AND NOT EXISTS (
SELECT null
FROM page AS scnd
WHERE scnd.page_namespace = 0
AND scnd.page_title = pl_title
)
ORDER BY pl_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.