SQL
AخA
USE trwiki_p;
SELECT CONCAT('[[',trpage.page_title,']]') AS page_title, CONCAT('[[User:',rev_user_text,']]') AS user,CONCAT('[[:en:',enwiki_p.page.page_title,'|',enwiki_p.page.page_title,']]') AS suggestions
FROM page AS trpage
JOIN enwiki_p.page
ON trpage.page_title= CASE WHEN enwiki_p.page.page_title= trpage.page_title THEN enwiki_p.page.page_title ELSE NULL
LEFT JOIN langlinks
ON ll_from = trpage.page_id
LEFT JOIN (SELECT * FROM page_props WHERE pp_propname = 'wikibase_item') AS props
ON pp_page = trpage.page_id
LEFT JOIN revision
ON rev_page = trpage.page_id
WHERE trpage.page_namespace = 0
AND trpage.page_is_redirect = 0
AND rev_parent_id = 0
AND enwiki_p.page.page_namespace = 0
AND enwiki_p.page.page_is_redirect = 0
AND ll_title IS NULL
AND pp_value IS NULL
AND NOT EXISTS
(SELECT * FROM page_props AS disambig1
WHERE disambig1.pp_propname LIKE 'disambiguation'
AND disambig1.pp_page = trpage.page_id)
OR trpage.page_title=enwiki_p.page.page_title
GROUP BY trpage.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.