Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions