Jeff Mathis writes: >now, leaving off name from the group by clause >(select max(close_date), symbol, name from TD >where symbol in ('aa','bb','cc') group by symbol;) > >gives > >+-----------------+--------+-------------+ >| max(close_date) | symbol | name | >+-----------------+--------+-------------+ >| 2004-10-05 | aa | cmptrhw | >| 2004-10-05 | bb | drugs | >| 2004-10-05 | cc | infosvcs | >+-----------------+--------+-------------+
Jeff, What version of MySQL are you using? I ran your query on 4.0.18 and got a different answer... mysql> select max(close_date), symbol, name from TD -> where symbol in ('aa','bb','cc') group by symbol; +-----------------+--------+---------+ | max(close_date) | symbol | name | +-----------------+--------+---------+ | 2004-10-05 | aa | cmptrhw | | 2004-10-05 | bb | biotech | | 2004-10-05 | cc | biotech | +-----------------+--------+---------+ 3 rows in set (0.01 sec) Brad Eacker ([EMAIL PROTECTED]) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]