# ST\_Union

An aggregation function that returns a MULTI geometry or NON-MULTI geometry from a set of geometries. It ignores NULL geometries.

## Signature

> ST\_Union(geometry\[])

## Usage Examples

These examples are based on the [Streaming Quick Start](https://docs.pinot.apache.org/release-1.2.0/basics/getting-started/quick-start#streaming).

```sql
select group_city, ST_AsText(STUnion(location)) AS unionString
from meetupRsvp 
GROUP BY group_city
ORDER BY STUnion(location) DESC
LIMIT 5
```

| group\_city | unionString                                                                                                                                                                                                                                                                                                                                    |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| London      | MULTIPOINT ((-0.21 51.54), (-0.19 51.5), (-0.19 51.56), (-0.18 51.49), (-0.18 51.51), (-0.18 51.52), (-0.16 51.52), (-0.14 51.54), (-0.13 51.5), (-0.13 51.51), (-0.13 51.52), (-0.13 51.53), (-0.12 51.51), (-0.12 51.53), (-0.11 51.53), (-0.1 51.5), (-0.1 51.52), (-0.09 51.5), (-0.09 51.52), (-0.07 51.52), (-0.02 51.49), (0.06 51.51)) |
| New York    | MULTIPOINT ((-74 40.72), (-74 40.74), (-73.99 40.73), (-73.99 40.75), (-73.99 40.76), (-73.98 40.75), (-73.98 40.79), (-73.97 40.75), (-73.94 40.81))                                                                                                                                                                                          |
| Austin      | MULTIPOINT ((-97.76 30.24), (-97.75 30.22), (-97.74 30.27), (-97.74 30.32), (-97.73 30.35), (-97.71 30.27), (-97.71 30.38), (-97.71 30.42))                                                                                                                                                                                                    |
| Denver      | MULTIPOINT ((-105.08 39.7), (-105.01 39.77), (-104.99 39.75), (-104.98 39.73), (-104.96 39.68), (-104.93 39.7), (-104.92 39.68))                                                                                                                                                                                                               |
| Atlanta     | MULTIPOINT ((-84.47 33.86), (-84.44 33.79), (-84.4 33.86), (-84.39 33.75), (-84.38 33.77), (-84.32 33.82), (-84.25 33.89))                                                                                                                                                                                                                     |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pinot.apache.org/release-1.2.0/configuration-reference/functions/stunion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
