Skip to main content

ST_Y

Introduced or updated: v1.2.458

Returns the latitude (Y coordinate) of a Point represented by a GEOMETRY or GEOGRAPHY object.

Syntax

ST_Y(<geometry_or_geography>)

Arguments

ArgumentsDescription
<geometry_or_geography>The argument must be an expression of type GEOMETRY or GEOGRAPHY and must contain a Point.

Return Type

Double.

Examples

GEOMETRY examples

SELECT
ST_Y(
ST_MAKEGEOMPOINT(
37.5, 45.5
)
) AS pipeline_y;

┌────────────┐
│ pipeline_y │
├────────────┤
45.5
└────────────┘

GEOGRAPHY examples

SELECT
ST_Y(
ST_GEOGFROMWKT(
'POINT(37.5 45.5)'
)
) AS pipeline_y;

┌────────────┐
│ pipeline_y │
├────────────┤
45.5
└────────────┘
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