This will bring you closer to what you need:
SELECT wa1.id_news id, wa2.id_news related FROM word_analysis wa1 JOIN word_analysis wa2 ON wa2.id_news != wa1.id_news AND wa2.word = wa1.word GROUP BY wa1.id_news, wa2.id_news HAVING COUNT(*)>2 ORDER BY wa1.id_news, wa2.id_news
If you do not need a reverse relationship:
SELECT wa1.id_news id, wa2.id_news related FROM word_analysis wa1 JOIN word_analysis wa2 ON wa2.id_news > wa1.id_news AND wa2.word = wa1.word GROUP BY wa1.id_news, wa2.id_news HAVING COUNT(*)>2 ORDER BY wa1.id_news, wa2.id_news
If you want to explore only one wa1.id_news (6):
SELECT wa2.id_news related FROM word_analysis wa1 JOIN word_analysis wa2 ON wa2.id_news != wa1.id_news AND wa2.word = wa1.word WHERE wa1.id_news = 6 GROUP BY wa1.id_news, wa2.id_news HAVING COUNT(*)>2 ORDER BY wa2.id_news
If you want to investigate only one relation (6-> 8), where the result means interconnected and no result is related:
SELECT 1 FROM word_analysis wa1 JOIN word_analysis wa2 ON wa2.id_news = 8 AND wa2.word = wa1.word WHERE wa1.id_news = 6 GROUP BY wa1.id_news, wa2.id_news HAVING COUNT(*)>2
source share