query-ebcdd81dc7b8c63bb35393b8c077b928
How to exclude with results that have a property whose the value is "novalue"Hello, in this query
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?iso
{
?item wdt:P220 ?iso . # looking for language that has a ISO 639-3 code
MINUS { ?item wdt:P1394 [] } . # with missing Glottolog ID
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
FILTER(NOT EXISTS {
?item rdf:type wdno:P1394 . # if Glottolog ID is not « no value »
?item schema:description ?itemDescription .
FILTER(LANG(?itemDescription) = "[AUTO_LANGUAGE],en") # with missing "your language" description
})
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?iso"):::projected
v3("?item"):::projected
v2("?itemDescription"):::projected
v1("?itemLabel"):::projected
a1((" "))
c8(["bd:serviceParam"]):::iri
c1(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wdno:P1394"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?itemDescription = '#91;AUTO_LANGUAGE#93;,en'"]]
e0f0 --> e0v1
e0v2 --"a"--> e0c3
e0v2 --"schema:description"--> e0v1
e0v2("?item"):::projected
e0v1("?itemDescription"):::projected
e0c3(["wdno:P1394"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v2
f0 --> v3
f0 --> c2
f0 --> c3
f0 --> c4
f1[["?itemDescription = '#91;AUTO_LANGUAGE#93;,en'"]]
f1 --> v2
v3 --"a"--> c3
v3 --"schema:description"--> v2
v3 --"wdt:P220"--> v4
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P1394"--> a1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c1
end