> ## Documentation Index
> Fetch the complete documentation index at: https://docs.risingwave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DROP AGGREGATE

> Use the `DROP AGGREGATE` command to remove an existing [user-defined aggregate function (UDAF)](/sql/udfs/user-defined-functions). The usage is similar to `DROP FUNCTION`, except that it's for aggregate functions.

## Syntax

```sql theme={null}
DROP AGGREGATE [ IF EXISTS ] function_name [ ( argument_type [, ...] ) ] ;
```

| Parameter or clause             | Description                                                                                                                                        |
| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------- |
| *function\_name*                | Name of the UDAF you want to drop.                                                                                                                 |
| ( *argument\_type* \[ , ... ] ) | Optional: Argument types of the function.Specify the argument types when the name of the function you want to drop isn't unique within the schema. |
| IF EXISTS                       | Do not return an error if the specified function does not exist. A notice is issued in this case.                                                  |

## Usage

A function can be dropped using one of the following methods:

* Full function signature:

```sql theme={null}
DROP AGGREGATE function_name ( argument_type [, ...] );
```

* Function name only, if it's unique in its schema:

```sql theme={null}
DROP AGGREGATE function_name;
```

You can run [SHOW FUNCTIONS;](/sql/commands/sql-show-functions) to list all existing UDFs to see if a function name is unique.

## See also

<CardGroup>
  <Card title="CREATE AGGREGATE" icon="plus" iconType="solid" href="/sql/commands/sql-create-aggregate">
    Create a user-defined aggregate function
  </Card>

  <Card title="DROP FUNCTIONS" icon="trash" iconType="solid" href="/sql/commands/sql-drop-function">
    Drop a user-defined function
  </Card>
</CardGroup>
