在oracle中,我的group by语句
SELECTFAMILYNAME_EN,CASEWHENSUM(COUNT(CONFIRM_IND))>SUM(COUNT(ATHLETE_ID))andSUM(COUN...
SELECT FAMILYNAME_EN,
CASE WHEN SUM(COUNT(CONFIRM_IND)) > SUM(COUNT(ATHLETE_ID)) and SUM(COUNT(CONFIRM_IND)) = 0 then 'Open'
WHEN SUM(COUNT(CONFIRM_IND)) > SUM(COUNT(ATHLETE_ID)) and SUM(COUNT(CONFIRM_IND)) < 0 then 'In Progress'
ELSE 'Close' end as STATUS
FROM HKG_DIST_ATHLETE GROUP BY FAMILYNAME_EN,CONFIRM_IND
为什么这样会报“不是单组分组函数” 展开
CASE WHEN SUM(COUNT(CONFIRM_IND)) > SUM(COUNT(ATHLETE_ID)) and SUM(COUNT(CONFIRM_IND)) = 0 then 'Open'
WHEN SUM(COUNT(CONFIRM_IND)) > SUM(COUNT(ATHLETE_ID)) and SUM(COUNT(CONFIRM_IND)) < 0 then 'In Progress'
ELSE 'Close' end as STATUS
FROM HKG_DIST_ATHLETE GROUP BY FAMILYNAME_EN,CONFIRM_IND
为什么这样会报“不是单组分组函数” 展开
1个回答
仁科信息
2024-07-24 广告
2024-07-24 广告
仁科信息-专业服务器维保服务商,性价比高!IT维保服务,网络运维维保,存储IT维保,服务器维保,优选专业IT维保服务商!全国276个城市覆盖,52000名合作工程师快速响应!报价合理,性价比高!北京仁科信息技术有限公司成立于2014年4月,...
点击进入详情页
本回答由仁科信息提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询