Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with the following database question Q.4 Consider the following schema for a car rental database. Customers (CustID, LastName, FirstName) Cars (CarID.CarMake) Orders (OrderID,CarID,

Please help with the following database question

image text in transcribed

Q.4 Consider the following schema for a car rental database. Customers (CustID, LastName, FirstName) Cars (CarID.CarMake) Orders (OrderID,CarID, CustID, NrOfReqs) Rentals (CustID.CarID,CheckoutDate.Duration) Write SQL statements for the following queries regarding the car database: a) Find the customers who have rented cars for 5 days or more (list the last names) b) Find out the make of the cars for which a total of at least 10 requests have been made. c) Find the average rental duration for each customer (report the result using last names) d) Find the ID and make of the cars that have been rented for at least 1 day and have not been ordered by customer with ID 111

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