Template:No statement
Jump to navigation
Jump to search
Usage
[edit]Write sparql code to find items with no statement for some property
Parameter | Description | Type | Status | |
---|---|---|---|---|
item | 1 item | name of the item variable (or item id)
| Unknown | required |
property | 2 | property id
| Unknown | required |
Examples
[edit]- Raw example
{{No statement|?item|P31}}
- gives
OPTIONAL { ?item wdt:P31 ?item_P31 } FILTER(!bound(?item_P31)) .
- Example in context, with a full query
{{sparql|query= select ?item { ?item wdt:{{Pid|parent taxon}} ?parent # item with a parent taxon statement {{no statement|?item|P31}} # and with no "instance of" statement } limit 10 }}
- gives
- Try it!
select ?item { ?item wdt:P171 ?parent # item with a parent taxon statement OPTIONAL { ?item wdt:P31 ?item_P31 } FILTER(!bound(?item_P31)) . # and with no "instance of" statement } limit 10
See also
[edit]The above documentation is transcluded from Template:No statement/doc (edit | history). Editors can experiment in this template's sandbox (create | mirror) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |
OPTIONAL { ?{{{1}}} wdt: ?{{{1}}} } FILTER(!bound(?{{{1}}})) .