Tente isso. SELECT *, max(DUP_NUMBER) as dup FROM table1 where CONTACTS=1 GROUP BY FIELD_A ORDER BY date LIMIT 3