Question
A.Consider the insurance database of Figure 3.17, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find the
A.Consider the insurance database of Figure 3.17, where the primary keys are underlined. Construct the following SQL queries for this relational database.
a. Find the total number of people who owned cars that were involved in accidents in 2017.
b. Delete all year-2010 cars belonging to the person whose ID is '12345'.
B. Suppose that we have a relation marks(ID, score) and we wish to assign grades
to students based on the score as follows: grade F if score C if 40
score B if 60 score A if 80 score. Write SQL
queries to do the following:
a. Display the grade for each student, based on the marks relation.
b. Find the number of students with each grade.
please do all parts.
A.Consider the insurance database of Figure 3.17, where the primary keys are underlined. Construct the following SQL queries for this relational database. a. Find the total number of people who owned cars that were involved in accidents in 2017. person (driver_id, name, address) car (license_plate, model, year) accident (report number, year, location) owns (driver_id, license_plate) participated (report number. license_plate, driver_id, damage_amount) b. Delete all year-2010 cars belonging to the person whose ID is '12345'. B. Suppose that we have a relation marks(ID, score) and we wish to assign grades to students based on the score as follows: grade Fif score C if 40 s score B if 60 s score A if 80 s score. Write SQL queries to do the following: a. Display the grade for each student, based on the marks relation. b. Find the number of students with each gradeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started