student(sid, sname, sex, age, year, gpa)
dept(dname, numphds)
prof(pname, dname)
course(cno, cname, dname)
major(dname, sid)
section(dname, cno, sectno, pname)
enroll(sid, grade, dname, cno, sectno)
select e.cno, e.sectno, avg(s.gpa)
from enroll e, student s
where dname = 'Computer Science' and s.sid = e.sid
group by dname, cno, sectno
The result was:
I want to keep rows for each separate section(sectno) of the same class, but don't know how to get the average goal per class(the same cno) for the two sessions, displaying in two lines?
Thanks~
The result I want is
Any help would be appreciated~