From: Dotan Cohen Date: October 20 2011 10:01pm Subject: Re: How to select the id of 2+ records for given user? List-Archive: http://lists.mysql.com/mysql/226141 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2011/10/20 Hal=C3=A1sz S=C3=A1ndor : > Well done--but.... > > Although, it seems, it is everyone s experience that the desired order is= the order that MySQL yields, all guarantee of that is explicitly deny'd (l= ook up 'GROUP BY'). It is better to be safe and to use "MIN": > > select * from table1 where messageID NOT IN ( > select MIN(messageID) from table1 > group by userID > ) > > Thanks. I actually used ORDER BY and LIMIT, I should have used MIN. This is how one learns! Thank you! --=20 Dotan Cohen http://gibberish.co.il http://what-is-what.com