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

# ST_UnaryUnion

This variant of [ST\_Union](/reference/wherobots-db/geometry-data/overlay/ST_Union) operates on a single geometry input. The input geometry can be a simple Geometry type, a MultiGeometry, or a GeometryCollection. The function calculates the geometric union across all components and elements within the provided geometry object.

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_UnaryUnion/ST_UnaryUnion.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=85b19122682b7d1b1f88447d1a5d854d" alt="ST_UnaryUnion" width="500" height="300" data-path="images/sql-functions/ST_UnaryUnion/ST_UnaryUnion.svg" />

## Signatures

```sql theme={"system"}
ST_UnaryUnion(geometry: Geometry)
```

## Parameters

<ParamField body="geometry" type="Geometry" required>
  The input geometry.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_UnaryUnion(ST_GeomFromWKT('MULTIPOLYGON(((0 10,0 30,20 30,20 10,0 10)),((10 0,10 20,30 20,30 0,10 0)))'))
```

```
POLYGON ((10 0, 10 10, 0 10, 0 30, 20 30, 20 20, 30 20, 30 0, 10 0))
```
