-----Original Message-----
what we want is the value for the name field corresponding to the row with the most recent close_date.
Based on that comment, I'd
select name from TD order by close_date DESC limit 1
except, we run into problems when there is a list of values for symbol in the query.
for example
select max(close_date), symbol, name from TD where symbol in ('aa','bb','cc','dd','ee') ....
in fact this is the real problem. for a single value of symbol, we can do this query. but we want to feed in a list of values for symbol
something like this:
select max(close_date), symbol, name from TD where symbol in (<list of characters>) group by symbol;
this returns the max close_date value, but the name that is returned is garbage and seems to point to the earliest row in the table.
any suggestions?
jeff
-- 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]