![]()
![]() ![]() ![]() ![]() ![]() ![]() ![]() Documentation Top ![]() Global Index ![]() Reference Manual ![]() ![]() ![]() Developer's Guide ![]() ![]() Tuning Cloudscape ![]() ![]() |
CREATE AGGREGATE statementThe CREATE AGGREGATE statement creates a user-defined aggregate. An aggregate, also known as a set function or a column function, provides a means for evaluating an expression over a set of rows. Cloudscape provides a number of built-in aggregates, such as MAX, MIN, COUNT, and the like. (For more information, see Aggregates (Set Functions).) With CREATE AGGREGATE, you can define your own aggregate functions. For example, whereas MAX gives you the maximum value in a column, you could define an aggregate called MAXBUTONE that would return the second highest value in a column, provided that you created a Java class to implement the aggregation. Another example is standard deviation; with the appropriate Java class to back it up, you could create an aggregate that operates on a set of doubles and returns the standard deviation. When you create an aggregate, you specify a Java class that implements COM.cloudscape.aggregates.AggregateDefinition. For information about creating such classes, see Programming User-Defined Aggregates in the Cloudscape Developers Guide. Syntax
You cannot create an aggregate with the same name as a method alias. You cannot create an aggregate with the same name as a built-in aggregate. User-defined aggregates are not permitted in check constraints. Examples | ||
![]() ![]() ![]() ![]() ![]() ![]() | ![]() ![]() Cloudscape Version 3.0 ![]() For technical support, go to: www.cloudscape.com and click Support. Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved. |