Write SQL statements to solve the following queries: - (a) Show the total number of students in the table Student.- (b) Show the DeptName and the number of instructors for each department (c) Show the average number of instructors in a department.|
- INSTRUCTOR(Iid, Name, DeptName).
ADVISOR(Sid, Iid).
STUDENT(Sid, Name, Dept Name).
Write SQL statements to solve the following queries: -
(a) Show the total number of students in the table Student.- (b) Show the DeptName and the number of instructors for each department (c) Show the average number of instructors in a department.| (d) For each department, show the DeptName and the number of instructors who advise the students in that department.(e) Show the lids of instructors who advise more than 1 student.(f) Show the names of the instructors who advise more than 1 student. If multiple instructors have the same names, output the name only for one time.(g) Show the lids of the instructors who advise no students.
Step by step
Solved in 2 steps