For example, I have this column in sqlite3:
hello world
hello you two
hello world
hello hello
I want to extract the most popular word and its occurences. However, untill now, it seems its only possible to find the occurences of a cell. Like this:
SELECT titles, COUNT(titles)
FROM standart_results
GROUP BY titles
ORDER BY count(*) DESC
It will return ("hello world", 2)
.
But I want ("hello", 5)
.
I can not use LIKE
as well since I do not know what word has the most occurences.
Do I need to transfer the data into a variable and use regex on it or can I do it with sql?