>select name >from mytable a >where changedate > > (select changedate > from mytable b > where a.name=b.name > and a.changedate != b.changedate); > >or: > >select name >from mytable a >where exists > (select * from mytable b > where a.name=b.name > and a.changedate > b.changedate);
Or, especially if your MySQL is earlier than 4.1 and you don't have subqueries: (also untested) select t1.name from mytable t1, mytable t2 where t1.name = t2.name and t1.date = 'd1' and t2.date = 'd2' and t1.changeDate > t2.changeDate - seb -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]