Assuming that insertdate is a DATE column, SELECT * FROM t WHERE t.insertdate = (SELECT MAX(t.insertdate) FROM t));
would do it. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 > -----Original Message----- > From: Vittorio ZuccalĂ [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 14, 2006 11:44 AM > To: mysql@lists.mysql.com > Subject: Max date in recordset > > Hello, > i've a table with a lot of field and in particular: > "InsertDate","Box","Prt" > Example: > InsertDate, Box, PRT > 2006-11-01, BXT, 34 > 2006-11-01, TTS, 33 > 2006-11-01, RRT, 55 > 2006-11-02, BXT, 22 > 2006-11-02, TTS, 99 > 2006-11-02, SAR, 75 > > > I'd like to find all record inserted in the last day... > In this example the last three records... > I do not know which is the last day before > > Any suggestions? > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]