query-f16030e916a16ef7ce3adeaa59d8d2b5
Enclave Municipalities in New Jersey
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 (?border as ?id) WHERE {
{
SELECT ?border (COUNT(?ida) AS ?count) WHERE {
?ida (wdt:P31/(wdt:P279*)) wd:Q54115138;
wdt:P47 ?border.
?border (wdt:P31/(wdt:P279*)) wd:Q54115138.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
FILTER(NOT EXISTS { ?ida wdt:P576 ?dob. })
}
GROUP BY ?border
}
FILTER (?count = 1 ) .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?border"):::projected
v5("?count")
v3("?dob")
v5("?id")
v2("?ida")
a1((" "))
a2((" "))
c5(["wd:Q54115138"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["en"]):::literal
f0[["?count = '1^^xsd:integer'"]]
f0 --> v5
f1[["not "]]
subgraph f1e0["Exists Clause"]
e0v1 --"wdt:P576"--> e0v2
e0v2("?dob"):::projected
e0v1("?ida"):::projected
end
f1--EXISTS--> f1e0
f1 --> v2
f1 --> c2
f1 --> v3
v2 --"wdt:P576"--> v3
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c5
v2 --"wdt:P47"--> v4
v4 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind3[/"count(?ida)"/]
v2 --o bind3
bind3 --as--o v5
bind4[/"?border"/]
v4 --o bind4
bind4 --as--o v5