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

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -