Question: Using the KCT design shown below, code SQL statements for the following. KCT _CUSTOMER(CustomerID, FirstName, LastName, Street, City, State, Zip, Phone) KCT _RENTAL(RentalID, RentalDate,NumberOfDays, RentalAmount,

Using the KCT design shown below, code SQL statements for the following.

KCT _CUSTOMER(CustomerID, FirstName, LastName, Street, City, State, Zip, Phone)

KCT _RENTAL(RentalID, RentalDate,NumberOfDays, RentalAmount, Deposit, Tax, TotalAmount, CustomerID, ReturnDate, AmountReturned)

KCT _LINEITEM(RentalID, CostumeID, Rate, Deposit)

KCT _COSTUMETYPE(TypeID, Description, Photo, DailyRentalRate, DepositRate, ReplacementCost)

KCT _COSTUME(CostumeID, Size, Availability, DatePurchased, CostumeType)

Question:

A. List the names and phone numbers of all customers who have a rental with a non-null (or greater than zero) TotalAmount and a null ReturnDate. Use a subquery.

B. Same as above, but use join within the WHERE clause.

C. Same as above, but use join with the JOIN ON syntax

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!