I need some experts advice on this one. I've worked on a solution for awhile and am getting no where. I need to select the newest entry for each id from a transactions table. Right now each id# can leave multiple records in the table and I am selecting them by "SELECT id, cb FROM $table_name WHERE date <='dateq' AND cb > '#'" (I could group them by id, but I don't see how this would help.) Now I just need to take it one step more, because this result gives me (or could give me) multiple entries from this table for each id, but I only want to display the latest entry for each id, without knowing what the id's are. I hope that made sesne.... Is this a secondary sort that needs to be done by a function I write or can it be done some other way? If it is a function, any ideas how to write it? Thanks in advance!!!