BETWEEN checks one range against each row.

highlighted = computed this step

Base rows

BETWEEN checks whether each row's value lands inside a pinned range.

row by row\text{row by row}

Show the rows

The pinned input has 6 rows.

input rows=6\text{input rows}=6

BETWEEN examples are tiny finite-table transforms with SQL-style TRUE/FALSE/UNKNOWN results; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.

Base rows for BETWEEN: base rowsidnameqty1small32edge-low53middle74edge-high95large126missingNULL BETWEEN result per rowsourcetestedValuelowerupperrangePositionbaseTruthtruthoutputRole0359belowFALSEFALSEdropped1559insideTRUETRUEkept2759insideTRUETRUEkept3959insideTRUETRUEkept41259aboveFALSEFALSEdropped5NULL59unknownUNKNOWNUNKNOWNdropped WHERE-style TRUE-only output rowsidnameqty2edge-low53middle74edge-high9 BETWEEN factsfactvalueinputRowCount6trueCount3falseCount2unknownCount1outputRowCount3droppedRowCount3belowCount1insideCount3aboveCount1equalEndpointRangenonegatednowhereKeepsTRUE_only_source_order

One range at a time

Each row gets a range position: below, inside, above, or unknown.

range position\text{range position}

Summary

WHERE-style output keeps only TRUE rows in source order.

TRUE rows kept\text{TRUE rows kept}