query-decd1c486d1ab1a3ec2b29705aa61aa8
German rurals without capital yet
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 ?rural ?key ?ruralLabel ?classLabel WHERE {
?class wdt:P279 wd:Q106658 .
?rural wdt:P31 ?class .
?rural wdt:P440 ?key .
FILTER NOT EXISTS {?rural wdt:P36 ?capital}
SERVICE wikibase:label{bd:serviceParam wikibase:language "de"}
}
ORDER BY ?key
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?capital")
v4("?class")
v1("?key"):::projected
v2("?rural"):::projected
c3(["wd:Q106658"]):::iri
c9(["de"]):::literal
c7(["bd:serviceParam"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P36"--> e0v2
e0v2("?capital"):::projected
e0v1("?rural"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"wdt:P36"--> v3
v4 --"wdt:P279"--> c3
v2 --"wdt:P31"--> v4
v2 --"wdt:P440"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end