"The value of the minimum is stored for some row(s) of a group and thus the having statement will select the row(s) with value equal to minimum" That will work with SAS SQL but I'm pretty sure that with Oracle SQL it wouldn't and you have to use some function for all columns not being part of the group by clause. I'm not sure if this behaviour is Oracle specific or an "ANSI standard" but using a function will always work - and as I don't have experience with the Sybase SQL flavour that's what I proposed to be on the safe side. Else it's the sub-query as Reeza proposed.
... View more