NOT BETWEEN flips TRUE and FALSE but not UNKNOWN.

highlighted = computed this step

NOT BETWEEN

NOT BETWEEN flips TRUE and FALSE from BETWEEN, while UNKNOWN stays UNKNOWN.

NOT preserves UNKNOWN\text{NOT preserves UNKNOWN}

Read inverted truth

NOT BETWEEN outputs 2 TRUE rows and keeps 1 UNKNOWN row dropped.

NOT TRUE rows=2\text{NOT TRUE rows}=2

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.

NOT BETWEEN truth inversion: base rowsidnameqty1small32edge-low53middle74edge-high95large126missingNULL BETWEEN result per rowsourcetestedValuelowerupperrangePositionbaseTruthtruthoutputRole0359belowFALSETRUEkept1559insideTRUEFALSEdropped2759insideTRUEFALSEdropped3959insideTRUEFALSEdropped41259aboveFALSETRUEkept5NULL59unknownUNKNOWNUNKNOWNdropped WHERE-style TRUE-only output rowsidnameqty1small35large12 BETWEEN factsfactvalueinputRowCount6trueCount2falseCount3unknownCount1outputRowCount2droppedRowCount4belowCount1insideCount3aboveCount1equalEndpointRangenonegatedyeswhereKeepsTRUE_only_source_order

Outside becomes TRUE

Rows below or above the range become TRUE under NOT BETWEEN.

outside kept\text{outside kept}

Summary

The output still uses source order and TRUE-only filtering.

TRUE only source order\text{TRUE only source order}