Documentation

    BETWEEN

    Check whether a value falls within an inclusive range.

    Try an expression

    In Formula, enter the expression and set Output type to BOOLEAN.

    Example input

    1. Row 1amount = 20
    2. Row 2amount = 120
    3. Row 3amount = NULL

    Expression

    amount BETWEEN 10 AND 50

    Result

    Row 1: true
    Row 2: false
    Row 3: NULL

    NULL means the value is missing.

    This Boolean expression also works in Filter custom mode. The True output receives rows 1; the False output receives rows 2, 3. A missing result goes to False.

    Arguments and types

    expr BETWEEN low AND high

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

    Browse conditions & missing valuesDuckDB documentation

    Function metadata from DuckDB, used under the MIT license.