Skip to main content

ST_YMIN

Introduced or updated: v1.2.512

Returns the minimum latitude (Y coordinate) of all points contained in the specified GEOMETRY or GEOGRAPHY object.

Syntax

ST_YMIN(<geometry_or_geography>)

Arguments

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

Return Type

Double.

Examples

GEOMETRY examples

SELECT
ST_YMIN(
TO_GEOMETRY(
'GEOMETRYCOLLECTION(POINT(-180 -10),LINESTRING(-179 0, 179 30),POINT EMPTY)'
)
) AS pipeline_ymin;

┌───────────────┐
│ pipeline_ymin │
├───────────────┤
-10
└───────────────┘

SELECT
ST_YMIN(
TO_GEOMETRY(
'GEOMETRYCOLLECTION(POINT(180 0),LINESTRING(-60 -30, 60 30),POLYGON((40 40,20 45,45 30,40 40)))'
)
) AS pipeline_ymin;

┌───────────────┐
│ pipeline_ymin │
├───────────────┤
-30
└───────────────┘

GEOGRAPHY examples

SELECT
ST_YMIN(
ST_GEOGFROMWKT(
'LINESTRING(-179 10, 179 22)'
)
) AS pipeline_ymin;

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