Q.1: Write SQL queries, using "Movie Rental Database" schema to extract following information i. Give all the customers who lives in Hamilton. Display customer_id and customer_name.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write SQL queries, using "Movie Rental Database"

Q.1: Write SQL queries, using "Movie Rental Database" schema to extract following
information
i. Give all the customers who lives in Hamilton. Display customer_id and customer_name.
ii. Display the total payment are received by each employee, and sort by empsin.
iii. Display the total movies are rented out by each store, and sort by storeid.
Display all the tapes are never rented out in every store, and sort by movieid & tapeid.
Display all customers who did not rent any movie so far and sort by custid.
Display the total amount received by different payment type, and sort by ptdesc.
Display the number of movies rented out based on the movie rating, and sort by rating.
viii. Display top 5 customers based on their total payment, and sort their total payment
iv.
V.
vi.
vii.
decreased.
List all the movies customer rented. Please display the columns: movie title,
rental status, rental_rate, rental_employee, the employ accepts the payment,
payment_type and payment_status.
List all the manager's name and the name of employee they manage. Please sort by
manager sin & employee sin.
ix.
х.
Transcribed Image Text:Q.1: Write SQL queries, using "Movie Rental Database" schema to extract following information i. Give all the customers who lives in Hamilton. Display customer_id and customer_name. ii. Display the total payment are received by each employee, and sort by empsin. iii. Display the total movies are rented out by each store, and sort by storeid. Display all the tapes are never rented out in every store, and sort by movieid & tapeid. Display all customers who did not rent any movie so far and sort by custid. Display the total amount received by different payment type, and sort by ptdesc. Display the number of movies rented out based on the movie rating, and sort by rating. viii. Display top 5 customers based on their total payment, and sort their total payment iv. V. vi. vii. decreased. List all the movies customer rented. Please display the columns: movie title, rental status, rental_rate, rental_employee, the employ accepts the payment, payment_type and payment_status. List all the manager's name and the name of employee they manage. Please sort by manager sin & employee sin. ix. х.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY