Write a query to display the columns listed below the query


Using MySQL SELECT commands answer the questions listed below using the Tiny Video schema used in your previous assignment. Submit via the D2L dropbox the final SQL script for each problem. All questions are worth 2 points each.

1. Write a query to display the columns listed below. The query should list each customer once, whether they have rented a movie or not. Where the customer has rented a movie it should show only the first rental date. The output should be sorted by membership number.

458_img1.png

2. Write a query to display the columns listed below. The query should list each customer who has not rented a move. The output should be sorted by membership number.

2272_img2.png

3. Write a query to display the columns listed below. The query should list each customer where the total detail rental fee is greater than twice the overall average detail rental fee. The output should be sorted by membership number. (Hint: A HAVING clause will be needed)

2298_img3.png

4. Write a query to display the columns listed below. The query should list each customer in which the video rental is overdue. The Days_Overdue column should calculate the number of days overdue based upon the due date and return date. The output should be sorted by membership number and then by the detail due date.

918_img4.png

5. Write a query to display the columns listed below. For each customer the query should show the current system date, the current day (when you do the problem the date and day will be different), the number of characters in the member last name, the last date the customer rented a video and how many total videos the person rented.

1414_img5.png

Attachment:- scripts.rar

Solution Preview :

Prepared by a verified Expert
Database Management System: Write a query to display the columns listed below the query
Reference No:- TGS01154555

Now Priced at $25 (50% Discount)

Recommended (93%)

Rated (4.5/5)

A

Anonymous user

5/13/2016 1:13:14 AM

The assignment is all about performing the tasks related to database. This is basically a narrative explanation of the ‘medical practice’. By utilizing MySQL SELECT commands respond the questions listed below using the information provided in the problem. 1) Write down a query to display the columns listed below. The query must list each customer once, whether they have rented a movie or not. Where the customer has rented a movie it must illustrate only the first rental date. The output must be sorted via membership number. 2) Write down a query to display the columns listed below. The query must list each and every customer who hasn’t rented a move. The output must be sorted via membership number. 3) Write down a query to display the columns listed below. The query must list each and every customer in which the total detail rental fee is more than two times the overall average detail rental fee. The output must be sorted via membership number.