group by case when 用法
select的字段要和group by的一样,并且group by不能用别名
select case when left(tagName,4)='http' then 'http'
when left(tagName,3) = '数据库' then '数据库'
else 0
end as tagName,count(1)
from IP_gene_info
group by (case when left(tagName,4)='http' then 'http'
when left(tagName,3) = '数据库' then '数据库'
else 0
end )