Skip to main content

LEAST_IGNORE_NULLS

Introduced or updated: v1.2.738

Returns the maximum value from a set of values, ignoring any NULL values.

See also: LEAST

Syntax​

LEAST_IGNORE_NULLS(<value1>, <value2> ...)

Examples​

SELECT LEAST_IGNORE_NULLS(5, 9, 4), LEAST_IGNORE_NULLS(5, 9, null);
┌──────────────────────────────────────────────────────────────┐
│ least_ignore_nulls(5, 9, 4) │ least_ignore_nulls(5, 9, NULL) │
├─────────────────────────────┼────────────────────────────────┤
│ 4 │ 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