What are the title and special features for films

Assignment Help Database Management System
Reference no: EM13953414

Assignment: SQL

Getting Data out of the Database

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

You will construct a single SQL queryusing MySQL Workbench that provides the answer to each of the questions below. You should also provide the answer to the question. Some of the questions can be answered by querying one table; others will require joining multiple tables to get the answer.

Also pay attention to what it says to Display. This is how your results should appear. For example:

Display: name and special features

Means that your SQL query should return only two columns of data: name and special features

(Note that this always isn't a field name, sometimes it is the result of a SUM(), COUNT(), or AVG()!)

Guidelines

• You must submit your answers electronically in a single Word document. You can copy and paste the SQL query and the results from SQL Workbench.

• You must include your name at the top of the document.

• Your answers should be emailed, as an attachment, from your Temple email account to the following OWLbox folder:[email protected]

• Please include your last name in the file name.

• The email must be sent by the start of class the day the assignment is due.

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

Evaluation

Your submission will be graded using two factors:

• A correctly formed SQL query that answers the specific question asked (no extra rows or columns).

• Providing the correct answer to the question (the answer the query provides).

Questions

1. What are the title and special features for films rated PG-13 and longer than 180 minutes?

Display: name and special features

2. What are the three most popular firstnames among the actors in the database?

Display: first name and the how many times that name appears in the database

3. What is the average rental cost (rate) for eachmovie rating (i.e., G, PG, R, NC-17)?

Display: rating and average rental rate

4. How many R movies mention ‘drama' in their description?

(Hint: use WHERE...LIKE with a wildcard. Remember, %dog% will match any value containing "dog," %dog will any value ending in "dog," and dog% will match any value beginning in "dog.")

Display: number of movies

5. Which store (identified by store_id) has the most movies in their inventory?

(Hint: List all stores. The list is short!)

Display: store_id, how many movies

6. Who were the stars of the movie "Operation Operation"?

Display: first name and last name

7. Which actors with a last name beginning with the letter "J" have starred in movies in theFrench language?

(Two hints: (1) Be sure to reference the language name "French" in your query and (2) Don't forget previous hints!)

Display: first name and last name

8. Which are the languages of the movies that Patricia Johnson has rented and how many has she rented in each of those languages?

(Hint: Assume no ties, just limit your results to the first three rows.)

Display: language name and how many movie rentals

9. What is the shortestR-rated movie in French and how long is it?

(Two hints: (1) Use a subselect statement with the MIN() function to return only the shortest movie and (2) be sure to reference the language name "French" in your query.)

Display: movie title and movie length

10. What was the shortest movie starring PenelopeGuiness and how long is it?

(Hint: Use a subselect statement with the MIN() function to return only the shortestmovie.)

Display: movie title and movie length.

Reference no: EM13953414

Questions Cloud

Calculate a conservative sample size estimate : Suppose that we want to conduct a study to estimate and confirm this rate to identify nodal metastases among breast cancer patients because previous estimates were all based on rather small samples. How many patients are needed to confirm this 90%..
Dextra computing sells merchandise : Dextra Computing sells merchandise for $17,000 cash on September 30 cost of merchandise is $11,900.
Valuation of inventory and measurement of income : Explain the relationship between the valuation of inventory and the measurement of income. Inventory costs ultimately become the cost of goods sold reflected in the income statement.
Preparation of its cash budget : A company is formulating its plans for the coming year, including the preparation of its cash budget.
What are the title and special features for films : What are the title and special features for films rated PG-13 and longer than 180 minutes? What are the three most popular firstnames among the actors in the database?
Wholesalers and retailers account for cost of goods sold : Show that you understand how wholesalers and retailers account for cost of goods sold. The cost of goods sold represents goods sold, as opposed to the inventory purchased during the year. Cost of goods sold is matched with the sales of the period.
Retailers account for sales of merchandise : Explain how wholesalers and retailers account for sales of merchandise. Net sales represents sales less deductions for discounts and merchandise returned (returns and allowances) and is a key figure on the income statement.
Test for the independence between the disease and exposure : Find a 95% confidence interval for the odds ratio measuring the strength of the relationship between the disease and the exposure. Test for the independence between the disease and the exposure.
Determining the definition of depreciation : Ignoring the effect of taxes, would you recommend the purchase or the lease? Why or why not? Referring to the definition of depreciation, what appropriate useful life should be used for the equipment and software?

Reviews

Write a Review

Database Management System Questions & Answers

  Working database that supports the above case.

The students are lodged in one of four houses, with a designated professor in change of each house. But, since some professors, such as Snape, have some problems standing some students, such as Harry, you should keep track of that too.

  Design a flowchart for a program

Design a flowchart for a program that declares an array of 10 characters. Program should count and print number of times a special character, (your choice, let say ‘a') has been found in the array.

  Co-related sub-query to return one row per customer

Use a co-related sub-query to return one row per customer, representing the customer's oldest order (the one with the earliest date).

  How to create a biological database based on viruses

How to decide which attribute should be there in the table and schema? How to identify the primary keys, foreign keys, domain, E-R diagram and 20 Queries on the same database.

  Why triggers are significant in database systems

What are triggers used for, and why are they significant in database systems? Give an example of situation where a trigger would be appropriate. What would implementation of this trigger look like?

  Apply and consolidate skills acquired in the requirement

Develop a domain model for the car park system. Express your model with a class diagram, showing any inheritance and compositional relationships.

  Advantages and disadvantages of working with multiple tables

Write down the advantages and disadvantages of working with multiple tables? Write an example of situation where multiple tables would be suitable in the application.

  Write names-e-mail addresses for customers by foreign key

Illustrate all data in each of the four tables. Don't show foreign key columns. Write down the names and e-mail addresses for all customers who have had stove repair which cost more than $50.

  Data storage and compression

Data Storage and Compression- Imagine that you are serving in the role of director of data center operations for your company, which is currently using redundant sites as backup and manually managing replication and failovers

  Database for university keep track of its course offerings

Assume you are making a database to help university keep track of its course offerings. You might have following entities in database, as they are distinct items in real life.

  What are the major business objectives

What are the major business objectives and processes that the airline company carries out and list the information systems and subsystems that are used to support their portal and describe how they are related to the overall business objectives and..

  How each influence the design of the logical database model

Your supervisor requested a short memo identifying each of the five W's and the H (Who, What, Where, When, Why, and How) and how each could influence the design of the logical database model. Compose an 600-word e-mail to your supervisor.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd