I have a table with some data like this: Type Null Default cpindex int(6) No cpid int(3) No 0 cpcid int(3) No 0 cpcust varchar(30) No 0 cprsm char(3) No cpprice float No 0 cpqty int(9) No 0 cpdate date No 0000-00-00 cpquote int(3) No 0 Indexes: Keyname Type Cardinality Field cpindex INDEX None cpindex cpid cpcid INDEX None cpcid cpid INDEX None cpid very simple data table, now the users have populated it with various amounts of data where the application will set the date to the current date (date data was enterred:Y-m-d format). So we have loads of data in the table where common items may have multiple entries on different days (we won't talk about multiple entries on the same day... users, egads!!). Ok, so far so good. Now, what I need to do is look at this database and get all of the most recent entries, en mass. The criteria to get the recordset is: cpid - product id cpcid - customer id i need all records with the most recent date by product group. What is the most efficient method of doing this? (using the select max(cpdate), * from cptable where cpid= $val and cpcid = $cval does not work). Thanks guys.