IBM® Informix® 12.10

Create user-defined aggregates

These topics describe how to extend the functionality of aggregates in the database server.

An aggregate is a function that returns one value for a set of queried rows. The database server provides two ways to extend aggregates:
  • Extensions of built-in aggregates

    A built-in aggregate is an aggregate that the database server provides, such as COUNT, SUM, or AVG. You can extend the built-in aggregates for use with UDTs.

  • User-defined aggregates

    A user-defined aggregate is an aggregate that you define to provide an aggregate function that the database server does not provide.

The term user-defined aggregates is often used loosely to include both extensions of built-in aggregates and new, user-defined aggregates. The database server manages all aggregates, whether built in or user defined. After you create an extension to the aggregate system, you use all aggregates in the same way, regardless of how the aggregate was created.

The techniques for providing the two types of extensions are different. These topics provide separate discussions of the two methods for extending aggregates.

For information about how to use aggregates in SELECT statements, refer to the IBM Informix Guide to SQL: Tutorial. For information about the syntax of aggregates, refer to the IBM Informix Guide to SQL: Syntax.


Send feedback | Examples exchange | Troubleshooting

To find the PDF, see Publications for the IBM Informix 12.10 family of products.
For the release notes, documentation notes, and/or machine notes, see the Release Notes page.
timestamp Release date: March 2013