anchor.diff:              Acc3 = append_to_eliminate_later(F_x, Acc2),
               {F, Acc3}
       end;
  +check_where_clause_is_possible_fold(_, _, {'<',{field,FieldName,_},{const,_LtVal}} = F, Acc) ->
  +    case find_filter_check(FieldName, Acc) of
  +        #filtercheck{'<' = undefined} = Check1 ->
  +            %% this is the first less than check so just record it
  +            Check2 = Check1#filtercheck{'<' = F},
  +            {F, lists:keystore(FieldName, #filtercheck.name, Acc, Check2)};
  +        #filtercheck{'<' = F_x} = Check1 when F_x < F ->
  +            %% we already have a filter that is higher than this one,
  +            %% which we can eliminate. Store it and eliminate it on the second
  +            %% pass since it has already been iterated
  +            Check2 = Check1#filtercheck{'<' = F},
  +            Acc2 = store_filter_check(Check2, Acc),
  +            Acc3 = append_to_eliminate_later(F_x, Acc2),
  +            {F, Acc3};
  +        #filtercheck{'<' = F_x} when F_x > F ->
  +            %% we already have a filter that is higher than this one, and so
  +            %% includes it so we can safely eliminate this one.
  +            {eliminate, Acc}
  +    end;
   check_where_clause_is_possible_fold(_, _, Filter, Acc) ->
       {Filter, Acc}.
   
  
positive.code:         S?SQL_SELECT.'WHERE'
      ).
  
  -endif.
  
negative.code:     {Field, FieldType, _OldVal} = lists:keyfind(Field, 1, TupleList),
      lists:keyreplace(Field, 1, TupleList, {Field, FieldType, NewVal}).
  
  -record(filtercheck, {name,'=','>','>=','<'}).
  
  check_where_clause_is_possible(DDL, WhereProps) ->
      Filter1 = proplists:get_value(filter, WhereProps),
  