Template:Unique values/doc
This is a documentation subpage for Template:Unique values. It contains usage information, categories, and other content that is not part of the original template page. |
partial query to select all items with a unique value for a property.
Naming
editSame convention of {{Multiple values}}
: ?<itemname>_<property>_val1
for the default value of the statement
Usage
editItems with a unique instance of (P31) value
{{sparql|query=
select ?item {
{{unique values|instance of|?item}}
} limit 1000
}}
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
See also
edit{{Multiple values}}
{{No value}}
Partial query that filters items that have a unique value for a property
Parameter | Description | Type | Status | |
---|---|---|---|---|
property | 1 property | property for which we search unique values
| Unknown | optional |
item | 2 | item variable or item id
| Unknown | optional |