select count(id) total,
case username when ''
then '电话'
else ifnull(username ,'')
end username
from xp_chineseinquiry
WHERE -- 条件
group by ifnull(username ,'')
Mysql 分组将NULL和空值分为一组
最新推荐文章于 2023-05-19 11:02:31 发布
select count(id) total,
case username when ''
then '电话'
else ifnull(username ,'')
end username
from xp_chineseinquiry
WHERE -- 条件
group by ifnull(username ,'')