anchor.diff:  -include("sql_tests.hrl").
   
   
  -%% -define(logf, ok).
  +%%-define(logf, ok).
   -ifdef(logf).
   -define(LOG(F, A), io:format(user, "{~p,~p}:"++F, [?MODULE,?LINE] ++ A)).
   
  
positive.code: binding('having') -> 80;
  binding('select') -> 70;
  binding('union') -> 30;
  binding('all') -> 30;
  binding('minus') -> 30;
  binding('intersect') -> 30;
  binding({A,_}) -> binding(A);
  
negative.code:     [#box{ind=Ind, idx=Idx, collapsed=sqlb_collapse(Ind), name=atom_to_binary(A, utf8)}];
  
  sqlb(Ind, _Idx, _Parent, _Ch, _X='%ret%', Acc=[#box{ind=I}|_]) when I<Ind ->
  %	io:format(user, "sqlb_ret ~p ~p ~p ~p ~p ~p ~n", [Ind, _Idx, _Parent, _Ch, keep, Acc]),
  	?LOG("~n---sqlb(~p,~p,~p,~p)", [Ind, _Idx, _Parent, _X]),
  	?LOG(" --> ~p", [Acc]),
  	Acc;
  sqlb(Ind, Idx, Parent, Ch, X='%ret%', Acc=[#box{ind=I}|_]) when I>Ind ->			%% X='%ret%'
  %	io:format(user, "sqlb_ret ~p ~p ~p ~p ~p ~p ~n", [Ind, Idx, Parent, Ch, reduce, Acc]),
  	?LOG("~n---sqlb(~p,~p,~p,~p)", [Ind, Idx, Parent, X]),
  	Acc1 = sqlb_reduce(I, Idx, Parent, Ch, X, Acc),
  	?LOG(" --> ~p", [Acc1]),
  	sqlb(Ind, Idx, Parent, Ch, X, Acc1);
  sqlb(Ind, Idx, Parent, Ch, X='%ret%', Acc=[#box{ind=I}|_]) when I==Ind ->
  %	io:format(user, "sqlb_ret ~p ~p ~p ~p ~p ~p ~n", [Ind, Idx, Parent, Ch, reduce, Acc]),
  	?LOG("~n---sqlb(~p,~p,~p,~p)", [Ind, Idx, Parent, X]),
  	Acc1 = sqlb_reduce(Ind, Idx, Parent, Ch, X, Acc),
  	?LOG(" --> ~p", [Acc1]),
  