A similar question was asked last week. There are good answers there.
SQL to search for duplicate records (within a group)
In this question, OP was interested in all the columns (fields) in the table (file), but the rows belonged to the same group if they had the same key value (afield1).
There are three types of answers:
subqueries in the where clause, like some other answers here.
inner join between table and groups treated as a table (my answer)
and analytic queries (something new for me).
Walter Mitty Oct 13 '08 at 12:50 2008-10-13 12:50
source share