Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Print the course names, course numbers and section numbers of all classes with l

ID: 3651756 • Letter: P

Question

Print the course names, course numbers and section numbers of all classes with less than six students enrolled in them.

I have tried a few different select commands, but can't quite figure it out.


Here are the Tables...

Student(sid,sname,sex,age,year,qpa)
Dept(dname,numphds)
Prof (pname,dname)
Course (cno,cname,dname)
Major(dname,sid)
Section(dname,cno,sectno,pname)
Enroll(sid,grade,dname,cno,sectno)

Course names = dname, Course Numbers = cno, Section Numbers = sectno.

Need to find all of those using select statements and only those classes with less than six students enrolled

Explanation / Answer

select count(*), s.dname, c.cno, s.sectno from section s, enroll e, course c where s.sectno = e.sectno and e.cno = c.cno group by s.dname, c.cno, s.sectno having count(*) > 6;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote