query-96736ff165283f4d6e1f2b0484bd72a7
Places in Lower Austria (Q42497) with Historical Gazetteer (GOV) ID (P2503) without GND ID (P227) and Link to lobid-gnd (Q51714594)
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 ?Ort ?OrtLabel ?GOV ?GND (IRI(CONCAT("http://lobid.org/gnd/search?filter=%2B(type%3ATerritorialCorporateBodyOrAdministrativeUnit)+geographicAreaCode.id%3A%22http%3A%2F%2Fd-nb.info%2Fstandards%2Fvocab%2Fgnd%2Fgeographic-area-code%23XA-AT-3%22&q=",?OrtLabel,"&format=json")) AS ?lobidurl) WHERE {
?Ort (wdt:P131+) wd:Q42497;
(wdt:P31/(wdt:P279*)) wd:Q486972;
wdt:P2503 ?GOV.
FILTER(NOT EXISTS { ?Ort wdt:P227 ?GND. })
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?GND"):::projected
v3("?GOV"):::projected
v1("?Ort"):::projected
v4("?lobidurl")
a1((" "))
c6(["wd:Q486972"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,de"]):::literal
c9(["bd:serviceParam"]):::iri
c3(["wd:Q42497"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P227"--> e0v2
e0v2("?GND"):::projected
e0v1("?Ort"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P227"--> v2
v1 --"wdt:P131"--> c3
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c6
v1 --"wdt:P2503"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end
bind1[/"concat('http://lobid.org/gnd/search?filter=%2B(type%3ATerritorialCorporateBodyOrAdministrativeUnit)+geographicAreaCode.id%3A%22http%3A%2F%2Fd-nb.info%2Fstandards%2Fvocab%2Fgnd%2Fgeographic-area-code%23XA-AT-3%22&q=',?OrtLabel,'&format=json')"/]
null --o bind1
bind1 --as--o v4