Write a query to display the columns listed

Assignment Help Database Management System
Reference no: EM13869141

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

Reference no: EM13869141

Questions Cloud

The speed with which it hits the ground : A person stands on the edge of a roof 490m above the ground and throws a stone horizontally with an initial speed of 15 m/s. Neglecting air resistance. find (a) the time taken by the stone to reach the ground. and (b) the speed with which it hits the..
What is the purpose of a cross join in mdx : What is the purpose of a cross join in MDX? Specifically, what gets returned as the result of a cross join.
Compute how much total expenditures the state : A state whose fiscal year ends June 30, 2013, had the following transactions and events. For each item, compute how much total expenditures the state will report in the General Fund Statement of revenues, expenditures and changes in fund balance f..
Calculate the maximum velocity it attains : The acceleration of a motorcycle is given by ax (t) = At - Bt2, where A = 1.50 m/s3 and B = 0.120 m/s'. The motor cycle is at rest at the origin at time t =0 a) Find its position and velocity as functions of time b) Calculate the maximum velocity it ..
Write a query to display the columns listed : 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 m..
Accounting for construction costs : Wells Corporation uses the percentage of completion method of accounting for construction costs. For Construction Project A, Wells had previously recognized revenue of $250,000 out of a total of $800,000 for the project.
How can i design a distributed shared memory over sockets : How can I design a distributed shared memory over sockets? Using two or more computers, i want project includedistributed system shared memory between to computer.
Inputs to maximize short-run profits : A price taking firm chooses its inputs to maximize short-run profits. Its Cobb-Douglass production function has the following form: q(L, K) = L ^(1/2)K^(1/3) . The output price is 1,000 per unit and the cost of each unit of input is 10. In the short-..
The angle between the direction of a and positive direction : The x and y components of a vector A are -25.0 m +40.0 m. respective y. What is the angle between the direction of A and positive direction of x?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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