I need help with certain questions. Please.
18. 4 points
For each Rental, list the Rental ID, Rental date, customer ID, customer first name, customer last name, and count of disks rented; sort by Rental ID. Show the Rental date formatted as ‘mm-dd-yyyy.’ Hint: use a GROUP BY clause.
19. 4 points
List the disk ID, title name, rating, format description, and fee amount for all copies rented in Rental 3; sort by disk ID. Show the fee amount formatted as currency and use the following column headings: DiskID, Title, Rating, Format, Fee.
20. 3 points
List the rating, rating description, and count of titles for each rating. Hint: use a GROUP BY clause.
21. 4 points
List the rental ID, disk ID, title name, genre name, fee code, and fee amount for all titles that have a fee amount greater than the average fee for all Rentals (using the average of the fees for all RentalDetail rows, not the average of the fees in the fee code table). Sort by title name. Hint: use a nested SELECT.
If you have any doubts, please give me comment...
-- 18
SELECT R.RentalID, RentalDate, C.CustID, CustFName, CustLName, COUNT(*) countDisks
FROM Customer C, Rental R, RentalDetail RD
WHERE C.CustID = R.CustID AND R.RentalID = RD.RentalID
GROUP BY R.RentalID, RentalDate, C.CustID, CustFName, CustLName
ORDER BY R.RentalID;
-- 19
SELECT D.DiskID, Title, RatingDesc Rating, FormatDesc Format, FORMAT(FeeAmt, 'C', 'en-us') Fee
FROM Fee F, RentalDetail R, Disk D, Title T, Rating R, Format F
WHERE R.RentalID = D.RentalID AND R.FeeCode = F.FeeCode AND D.FormatCode = F.FormatCode AND D.TitleID = T.TitleID AND T.RatingID = R.RatingID AND RentalID = 3
ORDER BY D.DiskID;
-- 20
SELECT R.RatingID, RatingDesc, COUNT(*) countTitles
FROM Rating R, Title T
WHERE R.RatingID = T.RatingID
GROUP BY R.RatingID, RatingDesc;
-- 21
SELECT RentalID, DiskID, Title, GenreName, F.FeeCode, FeeAmt
FROM RentalDetail R, Disk D, Title T, Genre G, Fee F
WHERE R.DiskID = D.DiskID AND D.TitleID = T.TitleID AND T.GenreID = G.GenreID AND R.FeeCode = F.FeeCode AND FeeAmt >=(
SELECT AVG(FeeAmt)
FROM RentalDetail R, Fee F
WHERE R.FeeCode = F.FeeCode
);
I need help with certain questions. Please. 18. 4 points For each Rental, list the Rental...
Using SQL*Plus on OMEGA, access the tables you created in Project 2 and complete the following SQL transactions. Log your statements and results by spooling your file (with echo on). Directions for creating and running SQL files are available in the Assignments and Exams page in Blackboard (in the Project 2 group of files). All column headings must show in their entirety. Be sure to include a cover sheet with your full name, section, and date submitted. 19. 4 points...
USING SQL 4. Show me the maximum rental duration and minimum rental duration from the film table. Name the columns MaxRentalDuration and MinRentalDuration respectively. 5. List the actor ID, last name, and first name of each actor and the count of films (name column FilmCount) each is in for those actors who acted in more than 35 films. Order results by FilmCount. (Hint: You will need to use GROUP BY and HAVING in your query.)
Hello, I need help answering all 8 of these questions for my BIS 422 class. I need the appropriate MySQL script to use for these questions Provide the SQL for the following data requests. Your SQL should be written as a single script that can be pasted into MySQL and run without edits. Make sure you use the proper notation for your comments (see the practice solution for an example of the format). There will be a 5% deduction for...
2) What were the total rental fees for each member by member last name? (w3schools-> SQL Inner Join& SQL Functions Count, Avg, Sum & SOL Group By)- this requires 2 joins 13) What were the total rental fees for members treport Mem num who total fees were greater than $5-change the output label to FeesMoreThan5S? (w3schools->SQL Inner Join & SQL Functions Count, Avg, Sum& SQL Group By & SQL Having) 14) What was the highest fee paid by each member...
This assignment consists of a series of SQL questions. For each question, you will need to include: • SQL query. • An explanation of the query. Please include explanations as a comment AFTER your query, e.g., enclosed within a /* comments block */ ). See the first example in the SQL tutorial for a comment. You don’t need to explain straightforward code in comments. Only the parts that are interesting or different, so that we understand what you did. Question-1...
SQL Homework 1. For each reservation, list the reservation ID, trip ID, customer number, and customer last name. Order the results by customer last name. 2. For each reservation for customer Ryan Goff, list the reservation ID, trip ID, and number of persons. 3. List the trip name of each trip that has Miles Abrams as a guide. 4. List the trip name of each trip that has the type Biking and that has Rita Boyers as a guide. 5....
Plz someone answer my database questions post Exercise I (50 pts): This exercise deals with a database that stores information abhout Hotel Management System. Customer (C email, name, country) Payment (Invoice id. C email, payment method, date) Invoice (Invoice id, starus, invoice description) Has (Bill id, Invoice id) Bill (Invoice id, Bill id, amount, Bname, type, date, reservation id) Reservation (Hotel id., room id. C email, date, period, reservation id) Rooms(Hotel id, room id. price, category) lotel (Hotel id, H...
DVD Rental System Develop a DVD/CD Rental System for a shop that rents out DVDs and VCDs to its registered customers. The system need to keep track of its rental information and compute rental fees collected from DVDs and CDs rented out to customers. This DVD Rental System is to be developed with methods using the Java programming language. The DVD rental shop has several DVDs and CDs, and many customers. Each customer is allowed to rent maximum of five...
I need this written in SQL Employee EMP ID EMP FNAME EMP LNAME EMP STREET EMP CITY EMP STATE EMP ZIP EMP START DATE Table TABLE ID AREA IDTABLE SEATS Area AREA ID AREA NAME AREA SUPERVISOR EMPLOYEE ID Customer CUST ID CUST LAST NAME CUST NUMBER OF GUESTS Assignment EMPID TABLE ID Seating CUST IDTABLE ID SEATING COST SEATING DATE SEATING TIP Question 29 (10 points) Write an SQL query to list the employee ID and first and last...
SQL commands of following questions: 4.List the count of orders and the nation name in each nation (join three tables: orders, customer and nation, and then use count(*) and group by) 5. List the sum of the total price and the nation name in each nation, descending by the sum of the total price. (join three tables and then use group by, order by and sum())