"the previous code someone suggested doesn't work for mysql."
next time, use 'reply to this message', not 'new topic' :-)
"select l_name, f_name, org_name, max(contact_date) from cust
group by l_name;"
Note: this is NOT a good query.
Yes it works in MySQL, but that is because MySQL makes a mistake here.
GROUP BY takes all rows that have the same value for l_name. You can select max(contact_date) because it simply calculates which of the contact_date values in the set is the highest. But you are not allowed to select things like f_name, because there can be a thousand rows that have the same l_name, but different f_names. So which f_name should the query return? A good database will warn you of this mistake, but MySQL just reports the first one it finds. This can cause serious errors in your data.