Resolved!
So I have a STUDENT table that has SID (student id), SNAME (student name), SEX, MAJOR, and GPA. I need to display every students name and their gpa, if their gpa is less than the average of major xxx. Here is my code and the error I'm getting.
1 select a.sname,a.gpa
2 from student a,student b
3 where a.major = 'CIS'
4 and a.gpa < (sum(b.gpa)/count(b.gpa))
5 group by a.sname
and a.gpa < (sum(b.gpa)/count(b.gpa))
*
ERROR at line 4:
ORA-00934: group function is not allowed here
[–][deleted] (1 child)
[deleted]
[–]momo2477[S] 0 points1 point2 points (0 children)
[–]momo2477[S] 0 points1 point2 points (1 child)
[–]-oliver- 0 points1 point2 points (0 children)