Examples/Queries/Aggregating numbers

From semantic-mediawiki.org
< Category:Examples
Examples/QueriesExamples/Queries/Aggregating numbers

math format, subobject query, aggregating numbers, sum

Sum for page embedded numbers[edit]

1, 1, 2, 4

{{#ask: [[{{PAGENAME}}]][[Has number::+]]
 |?Has number
 |format=sum
}}
 Has number
Examples/Queries/Aggregating numbers1
2
4

Total: 7

Sum for subobject embedded numbers[edit]

{{#ask: [[Has example::aggregating numbers]][[Has number::+]]
 |?Has number
}}
 Has number
Examples/Queries/Aggregating numbers#five4
Examples/Queries/Aggregating numbers#four2
Examples/Queries/Aggregating numbers#one1
Examples/Queries/Aggregating numbers#three1
Examples/Queries/Aggregating numbers#two1

Total: 9

See also[edit]