Mapping aggregate functions: AggrFuncMapper element
The AggrFuncMapper element is used for customizing the mappings of the aggregate functions listed in Table 11-15. The table also shows the default template for each function.
Aggregate function
Use COUNT_ROWS as the FunctionName for COUNT (*).
Example: Mapping the AVG function
The default template for the AVG function does not return the correct result for DECIMAL data types, so you use the following mapping:
<AggrFuncMapper>
  <FunctionMappings>
    <FunctionMapping FunctionName="AVG"
      OperandTypes="DECIMAL">
      CAST(AVG( $P0 ) AS $R)
    </FunctionMapping>
  </FunctionMappings>
</AggrFuncMapper>

Additional Links:

Copyright Actuate Corporation 2012