SELECT
INVOICEM.EMP_NO,
EMPLOYEES.EMP_NAME,
INVOICEM.INV_NO,
SUM(INVOICEM.SUM_AMT),
INVOICEM.SAL_DATE,
INVOICEM.BRANCH
FROM INVOICEM JOIN EMPLOYEES
ON INVOICEM.EMP_NO = EMPLOYEES.EMP_NO
GROUP BY INVOICEM.EMP_NO,EMP_NAME
帮帮我
答案 0 :(得分:0)
您只能在oracle中选择分组语句或聚合函数的字段:
SELECT INVOICEM.EMP_NO,EMPLOYEES.EMP_NAME,SUM(INVOICEM.SUM_AMT)
FROM INVOICEM JOIN EMPLOYEES
ON INVOICEM.EMP_NO = EMPLOYEES.EMP_NO
GROUP BY INVOICEM.EMP_NO,EMP_NAME