SELECT DW AS 单位,XB AS 性别,SUM(COUNT) AS 人数 FROM stu_table 加了SUM(COUNT) AS 人数就报 报错 ORA-
SELECT DW AS 单位,XB AS 性别,SUM(COUNT) AS 人数 FROM stu_table;
加了SUM(COUNT) AS 人数就报 报错 ORA-00937: 非单组分组函数. ------解决方法-------------------------------------------------------- SELECT DW AS 单位,XB AS 性别,SUM(COUNT) AS 人数 FROM stu_table group by dw xb;