query-3d9bb1974f6b0e97248f217a6caa5f64
County Seats of 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 ?id ?idLabel ?county ?countyLabel WHERE {
?id (wdt:P31/(wdt:P279*)) wd:Q54115138.
?id wdt:P31 wd:Q62049.
OPTIONAL { ?id wdt:P131 ?county. }
FILTER(NOT EXISTS { ?id wdt:P576 ?eol. })
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?countyLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?county"):::projected
v1("?countyLabel"):::projected
v3("?eol")
v2("?id"):::projected
a1((" "))
c4(["wd:Q54115138"]):::iri
c5(["wd:Q62049"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P576"--> e0v2
e0v2("?eol"):::projected
e0v1("?id"):::projected
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> c1
f0 --> v3
v2 --"wdt:P576"--> v3
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
v2 --"wdt:P31"--> c5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P131".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end