I have the following table structure
+ id + word + +------+--------+
The table is filled with words in the bottom frame of the specified text, so the text
Hello Hello hello,
will result in
+ id + word + +------+--------+ + 1 + hello + +------+--------+ + 2 + bye + +------+--------+ + 3 + hello + +------+--------+
I want to make a SELECT query that will return the number of words that will be repeated at least twice in the table (for example, hello)
SELECT COUNT(id) FROM words WHERE (SELECT COUNT(words.word))>1
which, of course, is so erroneous and super overloaded when the table is large. Any idea on how to achieve such a goal? In the above example, I would expect 1
mysql
fabjoa Oct 14 2018-10-14 20:31
source share