I have a table of keywords with an integer weight associated with it. In another table I have a table of texts. I would like to compute the value of each text by finding the keywords and summing the weights in the text. Is there a way to do this entirely in SQL?
Share
If you represent your texts as
where text with ID 1 is “nice weather no?”, for example, you can calculate the text scores using the keyword table
with
resulting in