User:Fralambert/Patrimoine transnational
Monuments étrangers dans un pays
editSELECT distinct ?item ?itemLabel ?designation_countryLabel ?locnLabel ?coords where {
?item wdt:P1435 ?designation. # item has a heritage designation
?item wdt:P17 wd:Q142. # item is in France - il est possible de changer le pays si nécéssaire
OPTIONAL {?item wdt:P625 ?coords.} # item may have coordinates
OPTIONAL {?item wdt:P131 ?locn.} # item may have a located in value
?designation wdt:P17 ?designation_country. # the heritage designation has a country
filter (wd:Q142!=?designation_country) # the country of the heritage designation is not France - Doit être le même pays que le premier
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?item
Monuments étrangers et trans frontalier (tous pays)
editIl y a probablement un ménage à faire dans celui-là
SELECT distinct ?item ?itemLabel ?countryLabel ?designation_countryLabel ?coords where {
?item wdt:P1435 ?designation. # item has a heritage designation
?item wdt:P17 ?country. # item has a country
OPTIONAL {?item wdt:P625 ?coords.} # item may have coordinates
# OPTIONAL {?item wdt:P131 ?locn.} # item may have a located in value
?designation wdt:P17 ?designation_country. # the heritage designation has a country
filter (?country!=?designation_country) # the country of the heritage designation is not the listing country
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?countryLabel ?itemLabel