PRAGMA WindowNewPipeline; $data = [ <|a: float('1.5'), count: 2|>, <|a: float('2.0'), count: 3|>, <|a: float('2.8'), count: 3|>, <|a: float('5.0'), count: 2|>, <|a: float('6.0'), count: 2|>, ]; $win_result = ( SELECT COUNT(*) OVER w1 AS actual_count, count, FROM AS_TABLE($data) WINDOW w1 AS ( ORDER BY a ASC RANGE BETWEEN 1.5 PRECEDING AND 1 FOLLOWING ) ); $str = ($x) -> { return CAST($x as String) ?? "null"; }; SELECT Ensure(actual_count, count IS NOT DISTINCT FROM actual_count, $str(actual_count)) FROM $win_result ;