Question: Answer all the following questions: Grade B A B Question (1) (15 Points) Consider the following schema for Credit Hour system with Sample Data Answer

 Answer all the following questions: Grade B A B Question (1)

Answer all the following questions: Grade B A B Question (1) (15 Points) Consider the following schema for Credit Hour system with Sample Data Answer the following Students Courses Semesters Enroll SID Sname CID CTitle Ser Year Term Ser SID CID 1 Ali 1 DB 1 2019 Fall 1 1 1 2 Ibrahim 2 Data Science 2 2019 Spring 1 2 1 3 Sarah 3 AI 3 2019 Summer 1 3 1 Grades 4 2020 Fall 2 1 2. Grad Weight 5 2020 Spring 2 2 1 e A 4 2 3 2 B 3 3 1 3 2 3 2 2 D 1.6 3 3 3 F 0 4 1 1 A B 21 A a. Write a stored function that takes the student ID and return his/her GPA. GPA is calculated as the average weight of all distinct enrolled courses. If a student repeat the course only the later one (higher ser) will be considered. b. Write a retrieve SQL statement that return students who finish all courses without any repetition and his/her GPA (consider the function you create in a). with Grade 'A'. Write c. The straight A students who finish all courses he/she enrolled appropriate SQL to retrieve these students

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!