select sum(redpackmoney) as stota,ischeck
from t_redpack
group by isCheck
使用case when :
select sum(redpackmoney) as stota,
(CASE isCheck WHEN '1' THEN 'checktrue' WHEN '0' THEN 'uncheck' WHEN '-1' THEN 'checkfalse' ELSE 'unknow' END) as checkinfo
from t_redpack
group by isCheck