wd:Q133346
wd:Q12413618
(“国际边界”):
SELECT ?border ?borderLabel ?country1Label ?country2Label ?isLandBorder ?isMaritimeBorder ?constraint {
VALUES (?country1) {(wd:Q183)}
?border wdt:P31 wd:Q12413618 ;
wdt:P17 ?country1 , ?country2 .
FILTER (?country1 != ?country2)
BIND (EXISTS {?border wdt:P31 wd:Q15104814} AS ?isLandBorder)
BIND (EXISTS {?border wdt:P31 wd:Q3089219} AS ?isMaritimeBorder)
BIND ((?isLandBorder || ?isMaritimeBorder) AS ?constraint)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} ORDER BY ?country1Label
Try it!
从某种意义上说,记录是重复的:对于阿富汗-努兹别克斯坦边界,清单包含了这两个方面
(?country1=Afganistan,?country2=Uzbekistan)
和
(?country1=Uzbekistan,?country2=Afganistan)
.
-
一个数据库或列表或准备好的哈希图与世界上所有有邻国的国家
你可以继续问
https://opendata.stackexchange.com
.