1

What im looking for is I have 2 words e.g. 'Family' and 'Family Tree'

then I would love to know that how much does both texts match to each others.

let say 'Family' and 'Family' >> 100 %

not sure any workaround or not.

Thank you so much.

freedomn-m
  • 27,664
  • 8
  • 35
  • 57
Paper.J
  • 13
  • 1
  • 5

2 Answers2

0

you can use like.

select * from tablename where fildname like '%Family%'

Result Give you all row in keyword is Family present.

0

For presto you can try looking into levenshtein_distance(string1, string2) → bigint built in function:

Returns the Levenshtein edit distance of string1 and string2, i.e. the minimum number of single-character edits (insertions, deletions or substitutions) needed to change string1 into string2.

Or (though it seems less suitable) hamming_distance(string1, string2) → bigint:

Returns the Hamming distance of string1 and string2, i.e. the number of positions at which the corresponding characters are different. Note that the two strings must have the same length.

Guru Stron
  • 102,774
  • 10
  • 95
  • 132