Ask PL-SQL Expert

Assignment: SQL Out - Getting Data out of the Database

For this assignment, you will be working with the same movie rental database as your in-class exercise (Moviedb). The schema is also the same, so you can use the one provided for the in-class exercise as a guide.

You will writeSQL query that would providethe answers to the questions on the next pages. Some of the questions can be answered by querying one table; others will require joining multiple tables to get the answer.

Guidelines

• You must include your name at the top of the document.
• You must include both the query and a screenshot of the output.

If you do not follow these instructions, your assignment will be counted late.

Evaluation

Your submission will be graded using the followingfactor:

1) A correctly formed SQL query that answers the question asked.
2) The correctness of the output of the query.

Questions

1. What is the rental rate and replacement cost for the film "Samurai Lion"?

Query:

Output:

2. What are the special features for the film "Alien Center"?

Query:

Output:

3. What are the maximum, minimum, average and total length of films?

Query:

Output:

4. Which country has the most cities in the database?

Query:

Output:

5. Which city has the most customers in the database?

Query:

Output:

6. What are the most popular last names among the actors in the database?

Query:

Output:

7. Which staff processed the most rental in the database?

Query:

Output:

8. Which movies are the least expensive to rent (on average) with regard to rating (e.g., G, R, PG)?

Query:

Output:

9. How many R movies mention a ‘Robot' in their description?(Hint: use WHERE...LIKE with a wildcard. Remember, %dog% will match any value containing "dog")

Query:

Output:

10. Who were the stars of the movie "King Evolution"?

Query:

Output:

11. What is the longest PG movie in English? And how long is it?

(Hint: Don't use the MAX function in the SELECT statement. It will give you the wrong answer.)

Query:

Output:

12. Who are the actorshave ‘Matt' in his first name and starred in movies in English?

Query:

Output:

13. Whohas rented the least movies? How many movies did he rent?

Query:

Output:

14. How many payments were processed on June 15, 2005? What was the total amount of payment on that day?

Query:

Output:

15. Which film attracted the most rental revenue? How much did that film generate in payment?

Query:

Output:

16. What was the longest movie starring Ben Harris? What's the movie length?

(Hint: Don't use the MAX function in the SELECT statement. It might give you the wrong answer.)

Query:

Output:

Attachment:- Movie-Rental-Schema.rar

PL-SQL, Programming

  • Category:- PL-SQL
  • Reference No.:- M92708963
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in PL-SQL

Complete the following tasksin microsoft access create the

Complete the following tasks: In Microsoft Access, create the database and tables that you identified in W3 Assignment 2. In Microsoft Word, write the SQL statements to create the database and tables. Write SQL statement ...

Purpose of the assessment with ulo mapping the purpose of

Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop skills in managing data in databases and to gain understanding of data model development and implementation using a commercially a ...

Continuing the project you have worked on in weeks 1-4 in

Continuing the project you have worked on in Weeks 1-4, in this final week, complete the following tasks: Refine your database and SQL statements by incorporating your instructor's feedback. Verify that the database comp ...

For this assignment you will be provided a database backup

For this assignment, you will be provided a database backup for a database called FinanceDB. You will have to restore this backup to your own version of SQL Server. All of the questions in this assignment relate to the F ...

Assignment - queries functions and triggersaimthe aims of

Assignment - Queries, Functions and Triggers Aim The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL queries; create SQ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As