query-ffc370df6bc26aafbcea0ac2a9c27ddb
Monuments étrangers dans un pays
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT 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
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?coords"):::projected
v3("?designation")
v2("?designation_country")
v1("?item"):::projected
v5("?locn")
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c1(["wd:Q142"]):::iri
f0[["'wd:Q142' != ?designation_country"]]
f0 --> v2
v1 --"wdt:P1435"--> v3
v1 --"wdt:P17"--> c1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P131".-> v5
end
v3 --"wdt:P17"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end