Important
The SingleStore 9.1 release candidate (RC) is available now. It will be promoted to general availability (GA) soon and at that time it will be renamed to SingleStore 10.
In the interim, SingleStore 9.1 RC can be used to preview, evaluate, and provide feedback on the new and upcoming features in SingleStore 10, while SingleStore 9.0 is recommended for production workloads.
SHOW CREATE AGGREGATE
On this page
The SHOW CREATE AGGREGATE command shows the function definition and other attributes for a user-defined aggregate function (UDAF).
Syntax
SHOW CREATE AGGREGATE function_nameRemarks
-
Refer to the Permissions Matrix for the required permissions.
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: utf8mb4
collation_connection: utf8mb4_bin
1 row in set (0.00 sec)Related Topics
Last modified: