Hy guys,
i searched some questions on stackoverflow, but i found no solution for my problem :(
I have a table with some values of a internal search database:
ID searchword hits
1 php 200
2 html 88
3 php state 68
4 php statement 43
5 js 83
6 html img 48
7 html include 34
And so on... I need a query to group searchwords, but also the similars. For example I need this result for the table above:
searchword
php statement (because 'php' and 'php statement' is similar)
js (because it´s only one row and standalone)
html img (because 'html' is similar, it´s included)
html include (because 'html' is similar, it´s included)
Is that possible? The query should not be static, because I don´t know all searchwords in the table. I think I need a DISTINCT and a LIKE query with wildcard (%)?!
But I don´t get it :(
http://sqlfiddle.com/#!9/cd24c/28
Regards Ronny