简体   繁体   中英

Count the number of times keywords appear in a mysql column

Ok I have a database table in which i collect the keywords which people use to visit my website, all of these keywords are stored in the column string.

Now what i want to do is count the words and group them by the number of times they are used, so for example if marketing is used six times i want to output to a table Marketing 6.

My problem is not sure if there is a function that will allow mysql to count all of the instances of words and then add them up.

And if not is there a way this can be done?

据我了解您的问题,您正在搜索如下内容:

SELECT COUNT(*), KEYWORD FROM TABLE GROUP BY KEYWORD

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM