Template:Query instances/doc
This is a documentation subpage for Template:Query instances. It contains usage information, categories, and other content that is not part of the original template page. |
This template creates a fragment of SPARQL that can be used within a query.
Usage edit
Plain usage (producing a portion of a SPARQL query):
- code:
{{Query instances|?item|Q5}}
- result: ?item wdt:P279*/wdt:P31 wd:Q5
Usage within a full query link:
- code:
{{Wdquery|
{{Query includes}}
SELECT ?item WHERE {{{Query instances|?item|Q5}}
} LIMIT 10|instances of{{Q|5}}
}} - result: instances of human (Q5)
See also edit
Query fragment to find all instances of some class, either as with an explicit "instance of" statement to the class or with a statement to a subclass of the class.
Parameter | Description | Type | Status | |
---|---|---|---|---|
item | 1 | item variable name or item id
| Unknown | required |
class | 2 | a class item variable or a class item id
| Unknown | required |
propns | propns | no description | Unknown | optional |