<br />Following up my treaty rate thoughts, if I'm trying to get the lowest treaty payee (and rate) from a specific
listof payees for every possible payor country, the following seems to work, but is it right? I'm specifically
wonderingabout the group by clauses. (Or if there is a better way.) [table treaties has columns payor,payee,rate and in
thissample, I'm just trying to find which country payee between Ireland and the Netherlands has the lowest rate from
eachindividual payor country.] <br /><br />select a.payor,a.payee,a.rate<br />from treaties a,<br /><br />(select
payor,min(rentr)from treaties<br />where payee in ('Ireland','Netherlands') group by payor<br />) b<br /><br />where
a.payor=b.payor<br/>and a.rate = b.min<br />and payee in ('Ireland','Netherlands')<br />group by a.payor, a.payee,
a.rate<br/>