MySql的写法:
select count(case when field14='流程' then 1 else null end) as '流程',
count(case when field14='技术' then 1 else null end) as '技术',
count(1) as '总数'
from crm_module_1;
还可以用sum
select sum(case when field14='流程' then 1 else 0 end) as '流程',
sum(case when field14='技术' then 1 else 0 end) as '技术',
sum(1) as '总数'
from crm_module_1;