MySQL Выберите последнюю строку для каждой группы
SELECT *
FROM CUSTOMERS
WHERE id IN (SELECT MAX(id) FROM CUSTOMERS GROUP BY PERSON_NAME);
Mysterious Macaque
SELECT *
FROM CUSTOMERS
WHERE id IN (SELECT MAX(id) FROM CUSTOMERS GROUP BY PERSON_NAME);