protected function filterBetweenCondition(array $data, $operator, $operands)
    {
        if (!isset($operands[0], $operands[1], $operands[2])) {
            throw new InvalidParamException("Operator '$operator' requires three operands.");
        }

        list($column, $value1, $value2) = $operands;

        if (strncmp('NOT', $operator, 3) === 0) {
            return array_filter($data, function ($row) use ($column, $value1, $value2) {
                return $row[$column] < $value1 || $row[$column] > $value2;
            });
        }

        return array_filter($data, function ($row) use ($column, $value1, $value2) {
            return $row[$column] >= $value1 && $row[$column] <= $value2;
        });
    }