Join Queries
Join Queries
o Query the student table to list all students with their corresponding department names.
o Retrieve all courses and the names of the instructors teaching them.
o Find all sections for the course with course code 'CS-101' and show the term, year,
building, and room number.
o Display each instructor's ID, name, and the course section they are teaching.
o List all students enrolled in the course 'BIO-101', including their IDs and names.
Intermediate Joins
o List all courses that have prerequisites, including the course code, course name, and the
prerequisite course code.
o Show each department with the courses it offers, including department name and
course title.
o Find all courses taught by the instructor with ID '83821', including course codes and
titles.
Advanced Joins
o Find students who have taken all courses offered by the Comp. Sci. department.
o List students whose advisors are from the Comp. Sci. department, including student IDs
and advisor names.
o Find departments that do not offer any courses, including department names.
o Calculate the average grade for each course, including course codes, titles, and average
grades.
Expert Joins
16. Find the Most Popular Time Slot for Each Course
o Determine which time slot (e.g., 'A', 'B', 'C', etc.) is most frequently assigned to sections
of each course.
17. List Students with the Highest Number of Credits Taken in Each Department
o Find the student who has taken the highest number of credits in each department.
o List courses that were not taught in the Spring 2018 semester.
19. Find the Departments with the Most Number of Courses Taught
o Count the number of courses taught by each department and list them in descending
order.
o Display the relationship between instructors, students, and the courses they are enrolled
in, including the course code, student ID, student name, instructor ID, and instructor
name.