SQL
AخA
USE wikidatawiki_p;
SELECT CONCAT('*\\',wsr.ips_site_page,' \\ [[Q',wsr.ips_item_id,']]'),
CONCAT('\\',wru.ips_site_page,' \\ [[Q',wru.ips_item_id,']]')
#count(wsr.ips_site_page)
FROM (SELECT ips_item_id, ips_site_page FROM wb_items_per_site WHERE ips_site_id = "cebwiki"
and ips_item_id not in (select ips_item_id from wb_items_per_site where ips_site_id = "svwiki")) AS wsr
JOIN (SELECT ips_item_id, ips_site_page FROM wb_items_per_site WHERE ips_site_id = "svwiki"
and ips_item_id not in (select ips_item_id from wb_items_per_site where ips_site_id = "cebwiki")) AS wru
ON wsr.ips_site_page = wru.ips_site_page
#REPLACE(wsr.ips_site_page, ' (вишезначна одредница)', '') = REPLACE(wru.ips_site_page, ' (значения)', '')
JOIN (SELECT * FROM pagelinks JOIN wb_entity_per_page ON epp_page_id = pl_from
WHERE pl_namespace = 0 and pl_title = "Q4167410") as plsr
ON wsr.ips_item_id = plsr.epp_entity_id
JOIN (SELECT * FROM pagelinks JOIN wb_entity_per_page ON epp_page_id = pl_from
WHERE pl_namespace = 0 and pl_title = "Q4167410") as plru
on wru.ips_item_id = plru.epp_entity_id
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.