SHOW CREATE AGGREGATE
Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
On this page
Shows the function definition and other attributes for a user-defined aggregate function (UDAF).
Syntax
SHOW CREATE AGGREGATE function_name
Remarks
-
Refer to the Permission Matrix for the required permission.
Example
The following example demonstrates how to execute a SHOW CREATE AGGREGATE
statement for the avg_
UDAF defined in CREATE AGGREGATE.
SHOW CREATE AGGREGATE avg_udaf \G
*** 1. row ***
Aggregate: avg_udaf
Create Aggregate: CREATE OR REPLACE AGGREGATE `avg_udaf` (bigint(20) NULL) RETURNS bigint(20) NULL WITH STATE record(`s` bigint(20) NULL, `c` bigint(20) NULL) INITIALIZE WITH avg_init ITERATE WITH avg_iter MERGE WITH avg_merge TERMINATE WITH avg_terminate DEFINER = 'root'@'%';
character_set_client: utf8
collation_connection: utf8mb4_general_ci
1 row in set (0.00 sec)
Related Topics
Last modified: May 29, 2025