SQL
x
SELECT elpage.page_title, elpage.page_id
FROM page enpage
INNER JOIN page article
ON enpage.page_title=article.page_title
INNER JOIN categorylinks ON cl_from = enpage.page_id
AND categorylinks.cl_to = "All_WikiProject_Medicine_articles"
INNER JOIN wikidatawiki_p.wb_items_per_site wikidata
ON wikidata.ips_item_id IN ( SELECT ips_item_id from wikidatawiki_p.wb_items_per_site wikien WHERE ips_site_page=REPLACE(enpage.page_title,'_',' ')
AND wikien.ips_site_id="enwiki")
AND wikidata.ips_site_id IN ("elwiki")
INNER JOIN elwiki_p.page elpage
ON elpage.page_title= REPLACE(wikidata.ips_site_page,' ','_')
WHERE enpage.page_namespace = 1
AND elpage.page_namespace=0
AND article.page_namespace = 0
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.