Oracle SQL lab, please help! I have these following tables:student, course, reg
ID: 3651920 • Letter: O
Question
Oracle SQL lab, please help!I have these following tables:student, course, reg
These are the attributes:
student(SID, SNAME, GPA, MAJOR)
course(CNO, CNAME, CREDITS, DEPT)
reg(SID CNO GRADE)
Here are the following questions:
1. Find students who did not take any course offered by the Bus department
2. Find students who did not take any 4 credit hour course
3. Find courses where every student got an A
4. Find students who got an A in all courses they took
5. Find courses where every student has a GPA over 3.5
6. Find courses where every student getting an A has a GPA over 3.5
7. Find students who took every course offered by the Bus Department
8. Find students who got a B in every course offered by the Bus department
9. Find the pairs of students who took exactly the same set of courses
10. Find Courses where more than half the students got an A
Explanation / Answer
1) select s.SID,s.SNAME from student s inner join course c on c.dept!='Bus' 2) select s.SID,s.SNAME from student s inner join course c on CREDITS>'4' 3) select c.CNAME from course join reg r on c.CNO=r.CNO where r.GRADE='A' 4) select s.SID,s.SNAME from student s inner join reg r on s.SID=r.SID where r.GRADE='A'
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.