# ST_CENTROID_AGG

Calculates the spatial centroid over a field with a spatial point geometry type.

## Syntax

`ST_CENTROID_AGG(field)`

### Parameters

#### `field`

The field containing spatial point geometry data.

## Examples

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

Calculate the spatial centroid of the `location` field in the `airports` dataset.
