Question:
You will have to write SQL queries against the subsequent database schema (keys are in bold):
- 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)
Question
Some courses are popular among students just because students enrolled in those courses generally get good grades.
Print the department name, course number, and course enrollment of each course C such that the subsequent two conditions hold:
Suppose that the enrollment of a course is the sum of the enrollment of all its sections. You will completely ignore any course that has no students enrolled in it.