query-c7b54901bec978c10a1f25955d0c0af0
Filtering on novalue is missing, but am getting those where it is set to
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
{
SELECT DISTINCT ?item WHERE {
?item p:P31 ?statement0.
?statement0 (ps:P31/(wdt:P279*)) wd:Q182531.
MINUS {
?item p:P289 ?statement2.
?statement2 (ps:P289/(wdt:P279*)) _:noValueP289_1.
}
MINUS {
?item p:P289 ?statement1.
?statement1 (ps:P289/(wdt:P279*)) _:anyValueP289_1.
}
}
}
}
Query found at
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2022/11
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/en
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/es
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/fr
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?statement0")
v4("?statement1")
v3("?statement2")
a3((" "))
a5((" "))
a1((" "))
a2((" "))
a4((" "))
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;"]):::literal
c8(["wd:Q182531"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:P31"--> v2
v2 --"p:statement/P31"--> a1
a1 --"p:direct/P279"--> c8
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:P289"--> v3
v3 --"p:statement/P289"--> a2
a2 --"p:direct/P279"--> a3
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:P289"--> v4
v4 --"p:statement/P289"--> a4
a4 --"p:direct/P279"--> a5
end