Hi Mike, I was planning to do something like David suggested: I would sort the rows based on name and then I would use a window (i.e. 100 rows) to compare each individual name to the previous 100. All I want to do is create groups of similar rows based on some criteria. -- View this message in context: http://postgresql.nabble.com/Merge-rows-based-on-Levenshtein-distance-tp5828841p5829146.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general