query-e8012db48c00861224b1898d63207217
GLAM de Suisse centrale SELECT DISTINCT ?item ?itemLabel ?loc2Label WHERE { ?item wdt:P31/wdt:P279* wd:Q1030034; wdt:P17 wd:Q39. ?item wdt:P131 ?loc. ?loc wdt:P31 wd:Q70208; p:P131 ?decl_loc2. ?decl_loc2 ps:P131 ?loc2.?loc2 wdt:P31 wd:Q23058. FILTER NOT EXISTS{?decl_loc2 ps:P131 ?loc2;pq:P582 ?datefin.}. wd:Q30978 wdt:P150 ?loc2. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de,it,en". } } ORDER BY ?loc2Label
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#GLAM de Suisse centrale
SELECT DISTINCT ?item ?itemLabel ?loc2Label
WHERE
{
?item wdt:P31/wdt:P279* wd:Q1030034;
wdt:P17 wd:Q39.
?item wdt:P131 ?loc.
?loc wdt:P31 wd:Q70208; p:P131 ?decl_loc2. ?decl_loc2 ps:P131 ?loc2.?loc2 wdt:P31 wd:Q23058.
FILTER NOT EXISTS{?decl_loc2 ps:P131 ?loc2;pq:P582 ?datefin.}.
wd:Q30978 wdt:P150 ?loc2.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de,it,en". }
}
ORDER BY ?loc2Label
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?datefin")
v2("?decl_loc2")
v5("?item"):::projected
v6("?loc")
v3("?loc2")
v1("?loc2Label"):::projected
a1((" "))
c12(["wd:Q30978"]):::iri
c11(["wd:Q23058"]):::iri
c7(["wd:Q39"]):::iri
c15(["bd:serviceParam"]):::iri
c9(["wd:Q70208"]):::iri
c5(["wd:Q1030034"]):::iri
c17(["#91;AUTO_LANGUAGE#93;,de,it,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:statement/P131"--> e0v2
e0v1 --"p:qualifier/P582"--> e0v3
e0v3("?datefin"):::projected
e0v1("?decl_loc2"):::projected
e0v2("?loc2"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
f0 --> c2
f0 --> v4
v2 --"p:statement/P131"--> v3
v2 --"p:qualifier/P582"--> v4
v5 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c5
v5 --"p:direct/P17"--> c7
v5 --"p:direct/P131"--> v6
v6 --"p:direct/P31"--> c9
v6 --"p:P131"--> v2
v2 --"p:statement/P131"--> v3
v3 --"p:direct/P31"--> c11
c12 --"p:direct/P150"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c15 --"wikibase:language"--> c17
end