Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX - |
Contents
Index
![]() ![]() |
Appendix B Format of Search, Return and Sort Expressions | > B.4 Return Expressions |
To aggregate data, specify text expressions, attribute expressions single-line function specifications, or aggregation function specifications in the return expression. Multiple specifications can be entered, each separated with commas. The return expression must include at least one aggregation function specification.
A sort expression must be specified when aggregating. Refer to B.5 Sort Expressions for more information on sort expressions.
The return items are shown below.
Specify a text expression when extracting a key for aggregation.
Refer to B.2.2 Text Expressions for more information on the format for text expressions.
Example
/doc/company/employee/dept/text() |
An attribute expression is used for extracting the key for aggregation.
Refer to B.2.3 Attribute Expressions for more information on the format for attribute expressions.
Example
/doc/company/employee/@position |
Specify single-line functions and extract the value of them when using single-line function specifications as the key for aggregation.
Refer to B.2.4 Single-line Function Specification for more information on the format for single-line function specifications.
Example 1
rlen(/doc/company/employee/name/text(),3) |
Example 2
rlen(/doc/company/employee/@position,3) |
Aggregation function specifications aggregate the values specified by the text expression or attribute expression passed as an argument.
The definition format for aggregation function specifications is shown below.
Extracts only numeric values from the strings expressed by the text expression or attribute expression and determines the average of these values.
Extracts only numeric values from the strings expressed by the text expression or attribute expression and determines the sum of these values.
Extracts only numeric values from the strings expressed by the text expression or attribute expression and determines the maximum of these values.
Extracts only numeric values from the strings expressed by the text expression or attribute expression and determines the minimum of these values.
Determines the number of elements specified by the text expression or attribute expression.
Contents
Index
![]() ![]() |