MySQL计算相同的字符串

fal*_*con 4 php mysql sql

MySQL列数据示例:

stringone
stringthree
stringtwo
stringone
stringone
stringthree
Run Code Online (Sandbox Code Playgroud)

如何通过PHP或mysql_本身从MySQL获得以下结果?我不懂字符串内容.

stringone    3x
stringthree  2x
stringtwo    1x
Run Code Online (Sandbox Code Playgroud)

感谢您的建议和指导.

jma*_*ail 5

试试这个:

SELECT columnname1,count(columnname1) 
  FROM tablename 
   GROUP BY conlumnname1;
Run Code Online (Sandbox Code Playgroud)

http://sqlfiddle.com/#!2/ecc99/1