An error regarding the GROUP BY clause in Oracle
I got this oracle error:
ORA-00979: not a GROUP BY expression
00979. 00000 - "not a GROUP BY expression"
*Cause:
*Action:
Error at Line: 1 Column: 17
When ran the below query:
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
When I delete all fields except M.EMAIL from the SELECT clause it works
but as soon as I add another field like M.FNAME get a same error!
What's going on?
No comments:
Post a Comment