From: Date: April 28 2008 2:19pm Subject: get all my newest messages List-Archive: http://lists.mysql.com/mysql/212550 Message-Id: <5a52f3270804280519j6db9c724je2f24e122a90214c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit hello i have a message table like this: created datetime sender int recipient int message text to get all my messages i would do: select * from message where sender = $MYID or recipient = $MYID but how do i make a query that returns the rows of only the NEWEST messages between myself and my contacts (regardless of who sent the newest message)? i tried using "group-wise maximum" mentioned in the mysql manual, but can't figure it out. hope someone can help. thanks!