Skip to main content

ST_ENDPOINT

Introduced or updated: v1.2.458

Returns the last Point in a LineString.

Syntax

ST_ENDPOINT(<geometry_or_geography>)

Arguments

ArgumentsDescription
<geometry_or_geography>The argument must be an expression of type GEOMETRY or GEOGRAPHY that represents a LineString.

Return Type

Geometry.

Examples

GEOMETRY examples

SELECT
ST_ENDPOINT(
ST_GEOMETRYFROMWKT(
'LINESTRING(1 1, 2 2, 3 3, 4 4)'
)
) AS pipeline_endpoint;

┌───────────────────┐
│ pipeline_endpoint │
├───────────────────┤
POINT(4 4)
└───────────────────┘

GEOGRAPHY examples

SELECT
ST_ENDPOINT(
ST_GEOGFROMWKT(
'LINESTRING(1 1, 2 2, 3 3, 4 4)'
)
) AS pipeline_endpoint;

┌───────────────────┐
│ pipeline_endpoint │
├───────────────────┤
POINT(4 4)
└───────────────────┘
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today