4.1.3 and the innodb engine on solaris 5.8 Brad Eacker wrote:
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])
-- Jeff Mathis, Ph.D. 505-955-1434 Prediction Company [EMAIL PROTECTED] 525 Camino de los Marquez, Ste 6 http://www.predict.com Santa Fe, NM 87505
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
