1. ORA-00937: 不是单组分组函数 和 不是group by表达式
--select count(corp_tn),state_code from t_oa_main where corp_tn=‘jiayuanshu‘ and oa_code=‘QJ_PT_0005_2017_3_0004‘ group by corp_tn; --不是group by表达式
--select count(corp_tn),state_code from t_oa_main where corp_tn=‘jiayuanshu‘ and oa_code=‘QJ_PT_0005_2017_3_0004‘ --ORA-00937: 不是单组分组函数
--select count(corp_tn),state_code from t_oa_main where corp_tn=‘jiayuanshu‘ and oa_code=‘QJ_PT_0005_2017_3_0004‘ group by state_code; --ok
2.
原文:http://www.cnblogs.com/an5211/p/6772490.html