Is this a good example of a required correlated subquery:
SELECT f1.firstname, f1.lastname, f1.ageFROM friends f1WHERE age = ( SELECT MAX(age) FROM
friendsf2 WHERE f1.state = f2.state )ORDER BY firstname, lastname
It finds the oldest person in each state. HAVING can't do that, right?
-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026