anchor.diff:          #filtercheck{'=' = {_,_,{const,EqVal}}} when GteVal > EqVal ->
               %% query like `a = 10 AND a >= 11` cannot be satisfied
               throw({error, {impossible_where_clause, << >>}});
  +        #filtercheck{'>' = {_,_,{const,GtVal}} = F_x} = Check1 when GtVal >= GteVal ->
  +            %% we already have a filter that is higher than the second 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{'>=' = undefined} = Check1 ->
               %% this is the first equality check so just record it
  -            Check2 = Check1#filtercheck{'>=' = F},
  -            {F, lists:keystore(FieldName, #filtercheck.name, Acc, Check2)};
  +            {F, store_filter_check(Check1#filtercheck{'>=' = F}, Acc)};
           #filtercheck{'>=' = F} ->
               %% this filter has been specified twice so remove the second occurence
               {eliminate, Acc};
  
positive.code:         compile(DDL, Q)
      ).
  
  -endif.
  
negative.code:             %% query like `a = 10 AND a > 8` we can eliminate the greater than
              %% clause because if a to be 10 it must also be greater than 8
              {eliminate, Acc};
          #filtercheck{'>=' = {_,_,{const,GteVal}}} when GtVal =< GteVal ->
              %% query like `a >= 10 AND a > 8` we can eliminate the greater than
              %% clause because if a to be greater than or equal to 10 it must
              %% also be greater than 8
              {eliminate, Acc};
          #filtercheck{'>' = undefined} = Check1 ->
              %% this is the first equality check so just record it
              Check2 = Check1#filtercheck{'>' = F},
  