clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1716912 fiddles created (23830 in the last week).

CREATE TABLE sentencess (sid INT, sent VARCHAR(32), verif INT); INSERT INTO sentencess (sid, sent) VALUES (336554, 'hello my name is alex'), (336555, 'hey alin and alex I''m tom'), (336556, 'hello alex my name is alin'); SELECT * FROM sentencess;
sid sent verif
336554 hello my name is alex
336555 hey alin and alex I'm tom
336556 hello alex my name is alin
 hidden batch(es)


SELECT ROW_NUMBER() OVER (ORDER BY COUNT(word) DESC, word) wid, word, COUNT(word) freq FROM sentencess CROSS JOIN JSON_TABLE( CONCAT('["', REPLACE(sentencess.sent, ' ', '","'), '"]'), "$[*]" COLUMNS( word VARCHAR(254) PATH "$" ) ) AS jsontable GROUP BY word ORDER BY freq DESC, word;
wid word freq
1 alex 3
2 alin 2
3 hello 2
4 is 2
5 my 2
6 name 2
7 and 1
8 hey 1
9 I'm 1
10 tom 1
 hidden batch(es)