2.21 QueryFunctionExpression

The QueryFunctionExpression element specifies the function to invoke over a set of arguments as input. The QueryFunctionExpression element is of type QueryExpression.

FunctionName: Specifies the name of the function to invoke. The FunctionName element MUST be specified and MUST NOT be specified more than once.

The values and meanings for the FunctionName element are as follows.

Value

Meaning

Core.Sum

Determines the aggregate summation of all values of the one and only argument.

QueryFunctionExpression.Arguments MUST be of size one.

Core.Count

Determines the aggregate count of all non-null values of the one and only argument.

QueryFunctionExpression.Arguments MUST be of size one.

Core.DistinctCount

Determines the aggregate count of distinct non-null values of the one and only argument.

QueryFunctionExpression.Arguments MUST be of size one.

Core.Average

Determines the aggregate average of all values of the one and only argument.

QueryFunctionExpression.Arguments MUST be of size one.

Core.Min

Determines the aggregate minimum of all values of the one and only argument.

QueryFunctionExpression.Arguments MUST be of size one.

Core.Max

Determines the aggregate maximum of all values of the one and only argument.

QueryFunctionExpression.Arguments MUST be of size one.

Arguments: Specifies a QueryExpressionList element as the input arguments to the function. The Arguments element MUST be specified and MUST NOT be specified more than once.

The following is the XSD for the QueryFunctionExpression element.          

   <xs:complexType name="QueryFunctionExpression">
     <xs:complexContent>
       <xs:extension base="QueryExpression">
         <xs:sequence>
           <xs:element name="FunctionName">
             <xs:simpleType name="FunctionName">
               <xs:restriction base="xs:string">
                 <xs:enumeration value="Core.Sum" />
                 <xs:enumeration value="Core.Count" />
                 <xs:enumeration value="Core.DistinctCount" />
                 <xs:enumeration value="Core.Average" />
                 <xs:enumeration value="Core.Min" />
                 <xs:enumeration value="Core.Max" />
               </xs:restriction>
             </xs:simpleType>
           </xs:element>
           <xs:element name="Arguments" type="QueryExpressionList" />
         </xs:sequence>
       </xs:extension>
     </xs:complexContent>
   </xs:complexType>