我收到了这个预言错误:
ORA-00979: not a GROUP BY expression
00979. 00000 - "not a GROUP BY expression"
*Cause:
*Action:
Error at Line: 1 Column: 17
运行以下查询时:
SELECT M.EMAIL, M.FNAME, M.LNAME, COUNT(*)
FROM MEMBER M, FRIENDSHIP F
WHERE (M.EMAIL = F.USER1 OR M.EMAIL = F.USER2 ) AND
F.TYPE = 'Family'
GROUP BY M.EMAIL
当我删除除M.EMAIL
该SELECT
子句之外的所有字段时,它会起作用,但是一旦我添加另一个字段,例如M.FNAME
得到相同的错误!
这是怎么回事?