Oops, I meant group by floor(h_q-x) instead of group by (h_q-x)/1
Marc Mamin > select H,A > FROM > ( > select min(h_q) as H, avg(x) as A > group by h_q/1 > union all > select min(h_q), avg(x) > group by (h_q-0.25)/1 > union all > select min(h_q), avg(x) > group by (h_q-0.50)/1 > union all > select min(h_q), avg(x) > group by (h_q-0.75)/1 > )foo > where A= select max(A) from (foo..)