Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

student( sid , sname, sex, age, year, gpa) dept( dname , numphds) prof( pname , dname) course( cno , cname, dname ) major( dname , sid ) section(

  • 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)

1.Print the sid and name of students who have enrolled in at least one course offered by the "Chemical Engineering" department and not enrolled in any course offered by the "Industrial Engineering" department.  

2.Students dedicated to their major. Print the ids, names and majors of those students enrolled in all courses offered by at least one of the departments they are majoring in.  

3.Print the sid and name of double-major students. 

4.For each department offering at least one course in which at least one student is enrolled, print the department name, the total enrollment of all courses offered by the department, the number of students enrolled in at least one of the courses offered by this department and their average age. 

5.Unpopular courses. For each course C, offered by some department D, with enrollment that is more than 20% lower than the average enrollment of all courses offered by D, print the name of the department D, the average enrollment of all courses offered by D, the course number of C, and the course enrollment of C. The enrollment of a course is the sum of the enrollment of all its sections. Note: you should consider all courses including those with zero enrollment. [Hint: You will need to use outer joins for this query.]

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question