Question: Show me the steps to solve these SQL queries. Here are the tables : student ( sid , sname, sex, age, year, gpa ) dept
Show me the steps to solve these SQL queries. Here are the tables :
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
The queries I need to answer are as follows :
Print the names of professors who work in departments that have fewer than PhD students
Print the names of the students with the lowest GPA
For each Computer Sciences class, print the class number, section number, and the average gpa of the students enrolled in the class section
Print the names and section numbers of all sections with more than six students enrolled in them
List the department names and the number of classes offered in each department.
Print the names of departments that have one or more majors who are under years old
Print the names and majors of students who are taking one of the College Geometry courses
For those departments that have no major taking a College Geometry course print the department name and the number of PhD students in the department
Print the names of students who are taking either a Computer Sciences course or a Mathematics course
Print the age difference between the oldest and the youngest Computer Sciences major
For each department that has one or more majors with a GPA under print the name of the department and the average GPA of its majors
Print the ids, names and GPAs of the students who are currently taking all the Civil Engineering courses
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
