query-252b0bd5fd32fd94de2fe9e2e2be0eae
TEMPLATE={ "template": { "en": "Entities with a Cultural heritage status located in ?country" }, "variables": { "?country": { "query": "SELECT ?id WHERE { ?id wdt:P31 wd:Q6256. }" } } } SELECT DISTINCT ?item WHERE { VALUES ?country {wd:Q40 wd:Q39 wd:Q183} ?item wdt:P17 ?country. FILTER EXISTS { ?item wdt:P1435 ?heritage. } }
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#TEMPLATE={ "template": { "en": "Entities with a Cultural heritage status located in ?country" }, "variables": { "?country": { "query": "SELECT ?id WHERE { ?id wdt:P31 wd:Q6256. }" } } }
SELECT DISTINCT ?item WHERE {
VALUES ?country {wd:Q40 wd:Q39 wd:Q183}
?item wdt:P17 ?country.
FILTER EXISTS { ?item wdt:P1435 ?heritage. }
}
Query found at
- https://www.wikidata.org/wiki/User:Jean-Fr%C3%A9d%C3%A9ric/Austria_contest_ideas_bis
- https://www.wikidata.org/wiki/Wikidata:Tenth_Birthday/DACH_Culture_Contest/queries
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?country")
v2("?heritage")
v1("?item"):::projected
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P1435"--> e0v2
e0v2("?heritage"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P1435"--> v2
bind1[/VALUES ?country/]
bind1-->v3
bind10(["wd:Q40"])
bind10 --> bind1
bind11(["wd:Q39"])
bind11 --> bind1
bind12(["wd:Q183"])
bind12 --> bind1
v1 --"wdt:P17"--> v3