sql - MySQL HELP- print the cno, sectno, and the average gpa of the students enrolled in Computer Science -
How can someone guide me:
Instructions are printed "Every Computer Science Class, The average GPP of students enrolled in CNO, Sittano, and Classroom. "
I have attached my table and my selection. Will someone tell me if my search shows that I am going in the right direction and if so, then I am stuck on how to write my atom I will call the student SID = Nomination SID to attach this table I do; I'm just confused how will it work? Please help me guide me .. Thank you ..
Students (SID, SNAM, Gender, Age, Year, Qpa) Department (DNA, MMFDS) Professor (PNA, DNA) Course (CNO , CNNA, DNAM Major (DNA, SID) section (DNA, CNO, Secto, PNA) Enrol (SID, Grade, DNA, CNO, Secto) Selection Nomination Name, Enroll, Register, Student. From the AGG (GPA), recruit zone 'student' on WEEI DNG = 'Computer Science'
To join you need to specify which columns are related to tables, and when you use consolidated functions like AGG, you need to use the group by clause.
Something like this:
Add student to SELECT Enroll.dname, enroll.cno, enroll.sectno, avg (gpa) student at student.sid = enroll.sid Enter WHERE dname = 'Computer Science' group by dname, cno, sectno
Comments
Post a Comment