Question: Problem 4 SQL (24 points, 8 points each) The following three tables contain the information of students, departments, and studentdepartment relationships. The primary key of

 Problem 4 SQL (24 points, 8 points each) The following threetables contain the information of students, departments, and studentdepartment relationships. The primary

Problem 4 SQL (24 points, 8 points each) The following three tables contain the information of students, departments, and studentdepartment relationships. The primary key of each table is underlined. For each query, write the output and provide a brief description of the query. (1) SELECT s.sname, d.dname, sd.startdate FROM Student s, Student_Department sd, Department d WHERE s.sid = sd.sid and d.did = sd.did (2) SELECT did, dname FROM Department WHERE did NOT IN (SELECT did FROM Student_Department GROUP BY did HAVING COUNT ()>1 ) (3) SELECT s.sname, s.gpa, d.dname FROM Student s, Student_Department sd, Department d WHERE s.sid = sd.sid AND d.did = sd.did AND s.gpa =( SELECT MIN (gpa) FROM Student)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!