---
title: "enum_range_boundary function in Strata | Oplema"
description: "Get the enum values between two given values as a list, including both ends. Write it as enum_range_boundary(start, end) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/enum-range-boundary"
updated: "2026-11-04"
---

# enum\_range\_boundary

Returns the range between the two given enum values as an array. The values must be of the same enum type. When the first parameter is NULL, the result starts with the first value of the enum type. When the second parameter is NULL, the result ends with the last value of the enum type.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
enum_range_boundary(NULL, 'happy'::ENUM('sad', 'ok', 'happy', 'anxious'))
```

### Result

```
'[sad, ok, happy]'
```

The expression returns `VARCHAR[]`. Formula stores it as `VARCHAR` in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | \[sad, ok, happy\] |

## Arguments and types

```
enum_range_boundary(start, end)
```

**start**

Any value

**end**

Any value

Supported signatures (1)

```
enum_range_boundary(start: ANY, end: ANY) → VARCHAR[]
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

### With a missing first argument

```
enum_range_boundary(NULL::"NULL", 'happy'::ENUM('sad', 'ok', 'happy', 'anxious'))
```

'\[sad, ok, happy\]'

## Related functions

[enum\_first

Returns the first value of the input enum type.

](https://oplema.com/docs/strata/functions/enum-first)[enum\_last

Returns the last value of the input enum type.

](https://oplema.com/docs/strata/functions/enum-last)[enum\_range

Returns all values of the input enum type as an array.

](https://oplema.com/docs/strata/functions/enum-range)[enum\_code

Returns the numeric value backing the given enum value.

](https://oplema.com/docs/strata/functions/enum-code)

[Browse enums](https://oplema.com/docs/strata/functions#enums) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/enum.html#enum_range_boundaryenum-enum)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
