query-e46455476479ea0a23272b7c58bf882d
title: Entities located in libraries in the DACH region SELECT DISTINCT ?item ?itemLabel WHERE { VALUES ?country {wd:Q40 wd:Q39 wd:Q183} ?item (wdt:P276|wdt:P195) ?location. ?location (wdt:P31/(wdt:P279*)) wd:Q7075; wdt:P17 ?country. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
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#>
#title: Entities located in libraries in the DACH region
SELECT DISTINCT ?item ?itemLabel WHERE {
VALUES ?country {wd:Q40 wd:Q39 wd:Q183}
?item (wdt:P276|wdt:P195) ?location.
?location (wdt:P31/(wdt:P279*)) wd:Q7075;
wdt:P17 ?country.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
- https://www.wikidata.org/wiki/User:Jean-Fr%C3%A9d%C3%A9ric/Austria_contest_ideas_ter
- 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;
v1("?country")
v2("?item"):::projected
v3("?location")
a1((" "))
c5(["wd:Q7075"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?country/]
bind0-->v1
bind00(["wd:Q40"])
bind00 --> bind0
bind01(["wd:Q39"])
bind01 --> bind0
bind02(["wd:Q183"])
bind02 --> bind0
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P195"--> v3
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P276"--> v3
end
union0r <== or ==> union0l
end
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
v3 --"wdt:P17"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end