Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My tables are as follows: Customer Table cust_id (PK), first_name, last_name, address_1, address_2, cc_number Movie Table movie_ID (PK), title, release_date, rental, rating, qty Transactions table

My tables are as follows:

Customer Table

cust_id (PK), first_name, last_name, address_1, address_2, cc_number

Movie Table

movie_ID (PK), title, release_date, rental, rating, qty

Transactions table

trans_id (PK), rental date, return_date, rental_fee, cust_id (FK), movie_id (FK)

I need help creating syntax for the following:

1. Join the MOVIE and TRANSACTION tables and display a list of movies that have been rented. Include the following columns: Title, rating, rentaldate, return date.

2. Join the CUSTOMER and TRANSACTION tables and display a list of customers and how much they spent in movie rentals. Include the following tables: Name, Address, CreditCard, Rental fee.

3. Creating a VIEW by joining the MOVIE and TRANSACTION tabes and dipslaying a list of movies that not been rented (hint: left join, where clause is null) Include the following: title, rating

4. Creating a VIEW by joining the MOVIE and TRANSACTION tables and displaying a list of movies along with the quantites available for rent. Include the following columns: title, qty available

5. run 2 queries of your choice using 1 or 2 sub queries.

Thanks so much.

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_2

Step: 3

blur-text-image_3

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

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions