MySQL Forums
Forum List  »  Newbie

Re: SELECT grouping problem with MAX()
Posted by: laptop alias
Date: January 20, 2008 02:04PM

SELECT t1.* FROM my_table t1
LEFT JOIN my_table t2
ON t1.id = t2.id AND t1.date < t2.date
WHERE t2.id IS NULL

Oh, and why not use a DATE type for a `date` column?

Options: ReplyQuote


Subject
Written By
Posted
Re: SELECT grouping problem with MAX()
January 20, 2008 02:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.