key 2ndkey nbr seq amount 1 100 100 1 10 2 100 100 2 11 3 100 100 3 9 4 200 101 1 50 5 200 102 1 200 6 200 102 2 100 7 300 103 1 12
select * from bid a where a.key = (select b.key, max(seq) from bid b where b.nbr = a.nbr and b.2ndkey = a.2ndkey group by b.nbr) and 2ndkey = 100 thanks, nf --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
