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

Return the 3-dimensional minimum cartesian distance between A and B

<img src="https://mintcdn.com/wherobots/AayJA2u8CknIeTgt/images/sql-functions/ST_3DDistance/ST_3DDistance.svg?fit=max&auto=format&n=AayJA2u8CknIeTgt&q=85&s=70a67c5a602ec1431e27df8b158613b4" alt="ST_3DDistance" width="400" height="220" data-path="images/sql-functions/ST_3DDistance/ST_3DDistance.svg" />

## Signatures

```sql theme={"system"}
ST_3DDistance (A: Geometry, B: Geometry)
```

## Parameters

<ParamField body="A" type="Geometry" required>
  The input geometry.
</ParamField>

<ParamField body="B" type="Geometry" required>
  The second geometry.
</ParamField>

## Return type

<ResponseField type="Double">
  A numeric value.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_3DDistance(ST_GeomFromText("POINT Z (0 0 -5)"),
                     ST_GeomFromText("POINT Z(1  1 -6"))
```

```
1.7320508075688772
```
