Answer the question
In order to leave comments, you need to log in
How to find similar records in the database?
Hello. How to find similar records by at least N (for example, 4) columns in the table
or find out by what number of columns the records match
example
one column | two | tree | four | five
1 | 2 | 3 | 4 | 5
1 | 2 | 3 | 4 | 994
| 2 | 3 | 4 | 99
Records 1 and 2 will be similar, and 2 and 3. values are unknown
Levenshtein distance is not suitable
Answer the question
In order to leave comments, you need to log in
SELECT one, two, tree, four, COUNT (five) AS cnt
FROM table
GROUP BY one, two, tree, four
HAVING COUNT (five) > 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question