Find rows with duplicate/similar column values MySQL
问题 I want to select from the following table all the rows which have similar values in the fname column as the first in their order. IOW from this table I want to retrieve rows with ids 2,5 and 7 (because " anna " comes after " anna ", and " michaela " and " michaal " come after " michael "). +----+------------+----------+ | id | fname | lname | +----+------------+----------+ | 1 | anna | milski | | 2 | anna | nguyen | | 3 | michael | michaels | | 4 | james | bond | | 5 | michaela | king | | 6 |