Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the given database tables, write SQL queries for each of the questions below. 1. For each section taught by professor King, retrieve the course

image text in transcribed

image text in transcribed

For the given database tables, write SQL queries for each of the questions below. 1. For each section taught by professor King, retrieve the course number, semester, year, and number of students that took the section. 2. Retrieve the current transcript for each sophomore student majoring in CS. A sophomore student has a class of 2. The transcript should show the student number, student name, course name, course number, course credits, semester & year at which the student took the course, and the obtained grade. 1. Use the Join operator. 3. Retrieve all the courses taken by student whose number is 8 in the fall of 2008. 4. Retrieve the names of all students that got an A in course CS1310. 5. Retrieve the total number of students in the database. 6. Retrieve the maximum number of credits for the database courses. 7. Retrieve the total number of courses that are worth three credits. 8. Retrieve the course numbers of all courses taught by professor Anderson 9. Retrieve the course names of all courses taught by professor Anderson. o Hint: You will need to join the section and course tables since the section table contains the instructor & section number, while the course table contains the course name. The course number is the PK-FK linking the two tables. 10. Retrieve the total number of students that got an A grade in all sections of MATH2410. 11. Retrieve the total number of sections offered for each course. 12. Retrieve the total number of enrollments for each section. 13. Retrieve the total number of enrollments for each course. 14. Question removed from assignment! 15. For instructors that taught at least two sections, retrieve the total number of sections taught by each instructor. 16. For students that enrolled in three or more sections, retrieve their student ID's and total number of sections they have enrolled in. STUDENT Name Smith Student number Class Major CS 17 1 Brown 8 2 CS Credit_hours Course_number CS1310 4 COURSE Course name Intro to Computer Science Data Structures Discrete Mathematics Database 4 CS3320 MATH2410 CS3380 Department CS CS MATH CS 3 3 Year Semester Fall 07 SECTION Section_identifier Course_number 85 MATH2410 92 CS1310 102 CS3320 112 MATH2410 07 08 Spring Fall Fall Instructor King Anderson Knuth Chang Anderson Stone 08 119 08 CS1310 CS3380 135 Fall 08 GRADE REPORT Student_number 17 Grade Section_identifier 112 B 17 119 8 85 A 8 92 A 8 102 B 8 135 A PREREQUISITE Course_number CS3380 CS3380 Figure 1.2 A database that stores student and course information. Prerequisite_number CS3320 MATH2410 CS1310 CS3320

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions