query-a9ef8d6ff7e5a6cfc55d2e72f434d8f2
Find items without a value for a property?Hi! With the Query Service, how can I do a search for items without a property? I can do this:
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 ?human ?property
WHERE
{
?human wdt:P31 wd:Q5.
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("?human"):::projected
c4(["bd:serviceParam"]):::iri
c2(["wd:Q5"]):::iri
c6(["en"]):::literal
v1 --"wdt:P31"--> c2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end