需要计算Mysql中字段的出现次数

时间:2017-01-25 05:32:21

标签: mysql

我有一个列中列出了一些值,我想计算组合字符串的出现次数

RowNo  DT1-Increased_CT_Reason_Start_to_Accept

1  ERIC_Drive Test Taking too Long;#ERIC_Lack Of GSC Resources/Queuing  DT  Drives;#ERIC_Cluster Having Too Many RF Issues Needing Tuning;#
2  ERIC_Drive Test Taking too Long;#ERIC_Lack Of GSC Resources/Queuing DT Drives;# 
3  ERIC_Drive Test Taking too Long;#
4  ERIC_Drive Test Taking too Long

我必须计算出现次数,我想要的输出是

DT1-Increased_CT_Reason_Start_to_Accept                   count  

ERIC_Drive Test Taking too Long                            4  
ERIC_Lack Of GSC Resources/Queuing  DT Drives              2
ERIC_Cluster Having Too Many RF Issues Needing Tuning      1

0 个答案:

没有答案