# ST_EXTENT_AGG

Calculates the spatial extent over a field with a geometry type, returning a bounding box for all values of the field.

## Syntax

`ST_EXTENT_AGG(field)`

### Parameters

#### `field`

The field containing geometry data over which the spatial extent is calculated.

## Examples

Calculate the spatial extent of airport locations in India

```esql
FROM airports
| WHERE country == "India"
| STATS extent = ST_EXTENT_AGG(location)
```

This example calculates the bounding box for the `location` field of airports in India.
