query-5826dc434d2e047933e7cb8ee53019fa
title: items by country without coordinates SELECT ?item ?itemLabel ?itemDescription WHERE { ?item wdt:P17 wd:Q40 . # Österreich ?item wdt:P131/wdt:P279 wd:Q40 . # liegt in einer Verwaltungseinheit in Österreich ?item wdt:P31/wdt:P279 ?isA . VALUES ?isA {wd:Q271669 wd:Q486972} # landform settlement #{?item wdt:P31/wdt:P279 wd:Q271669 .} union {?item wdt:P31/wdt:P279 wd:Q486972 .} # -> timeout filter not exists { ?item wdt:P625 [] .} SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE],de,en' } } limit 10000
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: items by country without coordinates
SELECT ?item ?itemLabel ?itemDescription WHERE {
?item wdt:P17 wd:Q40 . # Österreich
?item wdt:P131*/wdt:P279* wd:Q40 . # liegt in einer Verwaltungseinheit in Österreich
?item wdt:P31*/wdt:P279* ?isA .
VALUES ?isA {wd:Q271669 wd:Q486972} # landform settlement
#{?item wdt:P31*/wdt:P279* wd:Q271669 .} union {?item wdt:P31*/wdt:P279* wd:Q486972 .} # -> timeout
filter not exists { ?item wdt:P625 [] .}
SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE],de,en' }
} limit 10000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?isA")
v1("?item"):::projected
a1((" "))
a2((" "))
a3((" "))
c8(["bd:serviceParam"]):::iri
c3(["wd:Q40"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,de,en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P625"--> e0a1
e0v1("?item"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> a1
v1 --"wdt:P625"--> a1
v1 --"wdt:P17"--> c3
v1 --"wdt:P131"--> a2
a2 --"wdt:P279"--> c3
v1 --"wdt:P31"--> a3
a3 --"wdt:P279"--> v3
bind1[/VALUES ?isA/]
bind1-->v3
bind10(["wd:Q271669"])
bind10 --> bind1
bind11(["wd:Q486972"])
bind11 --> bind1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end