oracle - SQL Expression missing error -
i trying select table average of columns other tables other tables; schema follows.
students (sid, firstname, lastname, status, gpa, email)
enrollments (sid, classid, lgrade)
grades (lgrade, ngrade)
and erroneous query is,
select sid, lastname, avg( select g.ngrade grades g, enrollments e e.sid = sid , g.lgrade = e.lgrade , e.lgrade not null , g.ngrade not null) cgpa students order cgpa asc;
take semi-colon out of subquery.
Comments
Post a Comment