query-aedd1838865fd5da3a8808f84b0a4822
Usage value (P31)instance of Items with a unique }} } limit 1000 }}?item|instance of|unique values{{ select ?item { =query|sparql{{
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
select ?item {
?item wdt:P31 ?item_instance_of_val1
filter not exists {
?item wdt:P31 ?item_instance_of_val2
filter (?item_instance_of_val1 != ?item_instance_of_val2) .
}
} limit 1000
Query found at
- https://www.wikidata.org/wiki/Template:Unique_values
- https://www.wikidata.org/wiki/Template:Unique_values/doc
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v1("?item_instance_of_val1")
v2("?item_instance_of_val2")
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0f0[["?item_instance_of_val1 != ?item_instance_of_val2"]]
e0f0 --> e0v1
e0f0 --> e0v2
e0v3 --"wdt:P31"--> e0v2
e0v3("?item"):::projected
e0v1("?item_instance_of_val1"):::projected
e0v2("?item_instance_of_val2"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> v2
f0 --> v3
f0 --> c1
f1[["?item_instance_of_val1 != ?item_instance_of_val2"]]
f1 --> v1
f1 --> v2
v3 --"wdt:P31"--> v2
v3 --"wdt:P31"--> v1