Aggregating numbers
From Semantic MediaWiki - Sandbox
Storing values
{{#subobject: |Is row={{#counter: example }} // make the subobject unique |Has page={{FULLPAGENAME}} // provide an identical reference |Has text=first // some text |Has number=1 // some number }}
Querying values
{{#ask: [[Has page::{{FULLPAGENAME}}]] [[Has number::+]] |?Has text=Name |?Has number=Value |mainlabel=- }}
Result
- Table
NameUsed to store strings of arbitrary length. | ValueUsed for property values that contain any kind of number, integer, decimal, and floating point numbers. |
---|---|
first | 1 |
third | 1 |
second | 2 |
fourth | 2 |
- Total
6
- Count
4