Add Custom Aggregation

To add a custom aggregation, click Add expression and follow these steps:

  1. Output is the name of column that holds the results of the aggregation. Specify a name.

  2. Expression is the expression to add. To define an expression, click Launch expression Builder to edit Expression to open Expression Builder.

    This expression calculates all products bought by a customer and casts the result to a nested data type:

    CAST (COLLECT (TO_CHAR (PROD_ID)) AS ODMR_NESTED_VARCHAR2)
    
  3. To define a Sub Group By column, click Edit. The Edit Group By dialog box opens.
    It is not necessary to define a Sub Group By column.

  4. Click Validate to validate the expression.

  5. After you are done, click OK.