On further reflection, my first attempt works for the specific example but may
not in the general case. Try using a combination of max( ...id ) and min(
...val2 ) and add t1.val2 to the group by clause. This might work, but I've
deleted my test files now!
On Friday 01 Aug 2003 7:04 am, Nicholas
I think this does what you want. You can probably extend it to do the final
check for val3 vs. val2
select distinct t1.val1, max( t1.id ), t1.val2 from table as t1, table as t2
where t1.val2 <= t2.val2 group by t1.val1;
HTH
On Thursday 31 Jul 2003 3:22 pm, Petre Agenbag wrote:
> Hi List
>
2 matches
Mail list logo