query-027e70db697e75a5982a8806bb050e97
Find all formations that are missing an underlying and overlying unit SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q736917 . FILTER NOT EXISTS { ?item wdt:P568 ?x; wdt:P567 ?y } . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } . }
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#>
# Find all formations that are missing an underlying and overlying unit
SELECT ?item ?itemLabel WHERE {
?item wdt:P31 wd:Q736917 .
FILTER NOT EXISTS { ?item wdt:P568 ?x; wdt:P567 ?y } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?x")
v3("?y")
c6(["bd:serviceParam"]):::iri
c4(["wd:Q736917"]):::iri
c8(["en"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P568"--> e0v2
e0v1 --"wdt:P567"--> e0v3
e0v1("?item"):::projected
e0v2("?x"):::projected
e0v3("?y"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
f0 --> c2
f0 --> v3
v1 --"wdt:P568"--> v2
v1 --"wdt:P567"--> v3
v1 --"wdt:P31"--> c4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end