Extend existing aggregates
The database server provides built-in aggregate functions, such as SUM and COUNT, that operate on the built-in data types. You can extend a built-in aggregate so that it can operate on UDTs. To extend a built-in aggregate, you must create UDRs that overload several binary operators.