Create user-defined aggregates
A user-defined aggregate extends the database server by providing information that allows the database server to apply that aggregate to data in the database. To create a user-defined aggregate, write and register support functions that perform the aggregation and then implement the aggregate with the CREATE Aggregate statement.
The CREATE Aggregate statement provides the following information
about the aggregate to the database server:
- The name of the aggregate
- The owner of the aggregate
- The names of the functions that support the aggregate
- Modifiers to the aggregate
For the syntax of the CREATE AGGREGATE statement, see the HCL OneDB™ Guide to SQL: Syntax.
You cannot create a user-defined aggregate for any of the following
data types:
- Collection data types: LIST, MULTISET, or SET
- Unnamed row types
- Smart-large-object data types: CLOB or BLOB
- Simple-large-object data types: TEXT or BYTE