I have these following tables:student, course, reg These are the attributes: stu
ID: 3651928 • Letter: I
Question
I have these following tables:student, course, regThese 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 4 credit hour course
2. Find courses where every student got an A
3. Find courses where every student has a GPA over 3.5
4. Find courses where every student getting an A has a GPA over 3.5
5. Find students who took every course offered by the Bus Department
6. Find students who got a B in every course offered by the Bus department
7. Find the pairs of students who took exactly the same set of courses
8. 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'