> ## 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_H3ToParent

Returns the parent H3 cell at the requested resolution. Use this function to group finer-resolution H3 cells into coarser cells.

The requested resolution must be between `0` and the input cell's resolution, inclusive. Requesting the input cell's own resolution returns that cell unchanged. An out-of-range resolution raises an error.

## Signatures

```sql theme={"system"}
ST_H3ToParent(cell: Long, resolution: Int)
```

## Parameters

<ParamField body="cell" type="Long" required>
  The input H3 cell ID. You can obtain cell IDs with [ST\_H3CellIDs](/reference/wherobots-db/geometry-data/spatial-indexing/ST_H3CellIDs).
</ParamField>

<ParamField body="resolution" type="Integer" required>
  The resolution of the parent cell, from 0 through the input cell's resolution.
</ParamField>

## Return type

<ResponseField type="Long">
  The parent H3 cell ID.
</ResponseField>

## Example

Find the resolution-5 parent of a resolution-8 cell:

```sql theme={"system"}
SELECT ST_H3ToParent(614552609325318143, 5) AS parent_cell;
```

```text theme={"system"}
601041811137363967
```

Requesting resolution 8 returns the original cell:

```sql theme={"system"}
SELECT ST_H3ToParent(614552609325318143, 8) AS parent_cell;
```

```text theme={"system"}
614552609325318143
```
