# ST_CENTROID_AGG

The ST_CENTROID_AGG function calculates the spatial centroid over a field with spatial point geometry type.

## Syntax

`ST_CENTROID_AGG(field)`

### Parameters

#### field

The field parameter represents the column that contains the spatial point geometry data.

## Examples

Here is an example of how to use the ST_CENTROID_AGG function:

```esql
FROM airports
| STATS centroid = ST_CENTROID_AGG(location)
```

```esql
FROM city_boundaries
| STATS city_centroid = ST_CENTROID_AGG(boundary)
```
