当前位置:首页 > 数据库 > Oracle

oracle-记录

同時查新多个条件的数量

select sum(DECODE(trim(t.ASSESSED_RESULT),‘维持‘,1,0)) maintainNum,
sum(DECODE(trim(t.ASSESSED_RESULT),‘晋升‘,1,0)) upNum,
sum(DECODE(trim(t.ASSESSED_RESULT),‘降级‘,1,0)) degradeNum,
sum(DECODE(trim(t.ASSESSED_RESULT),‘终止合同‘,1,0)) dissolutionNum
from t_AssessResultInfo t, t02salesinfo_backup s
where s.team_id=#{teamId} and t.sales_code=s.sales_code and s.channel_id=#{channelId} and s.year_month=#{month}
and s.year_month=t.stat_month

原文:https://www.cnblogs.com/jjSmileEveryDay/p/9467345.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐