If you have any doubts, please give me comment...
-- 12
SELECT SUM(DETAIL_FEE) total_rental_fee
FROM MEMBERSHIP M JOIN RENTAL R ON M.MEM_NUM = R.MEM_NUM JOIN DETAILRENTAL D ON R.RENT_NUM = D.RENT_NUM
GROUP BY MEM_LNAME;
-- 13)
SELECT MEM_NUM AS FeeMoreThan5$
FROM RENTAL R JOIN DETAILRENTAL D ON R.RENT_NUM = D.RENT_NUM
GROUP BY MEM_NUM
HAVING SUM(DETAIL_FEE)>5;
-- 14
SELECT MEM_NUM, MAX(DETAIL_FEE)
FROM RENTAL R JOIN DETAILRENTAL D ON R.RENT_NUM = D.RENT_NUM
GROUP BY MEM_NUM;
-- 15
SELECT MOVIE_TITLE, DETAIL_DUEDATE, DETAIL_RETURNDATE
FROM MOVIE M JOIN VIDEO V ON M.MOVIE_NUM = V.MOVIE_NUM JOIN DETAILRENTAL D ON V.VID_NUM = D.VID_NUM
WHERE DETAIL_RETURNDATE IS NULL;
2) What were the total rental fees for each member by member last name? (w3schools-> SQL...
Scenario: Elite Video is a startup company providing concierge DVD kiosk service in Kennesaw, GA. FIGURE P8.47 THE CH08 MOVIECO ERD DETAILRENTAL MEMBERSHIP RENTAL PK MEM NUM PK,FK1 RENT NUM PK,FK2 VID NUM PK RENT NUM RENT DATE FK1 MEM_NUM MEM_FNAME MEM_LNAME MEM_STREET MEM_CITY MEM_STATE MEM_ZIP MEM_BALANCE DETAIL_FEE DETAIL_DUEDATE DETAIL_RETURNDATE DETAIL_DAILYLATEFEE MOVIE VIDEO PK MOVIE NUM PK VID NUM PRICE -0% PK PRICE CODE VID_INDATE FK1 MOVIE_NUM PRICE DESCRIPTION PRICE_RENTFEE PRICE_DAILYLATEFEE MOVIE_TITLE 0---06 MOVIE YEAR MOVIE_COST MOVIE GENRE FK1 PRICE_CODE...
QUESTION 21 Complete the table below by matching each definition with the appropriate SQL clause. -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A mandatory clause that is at the start of all SQL retrieval queries -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause used to return only the values in a result table that are unique -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause used to filter tuples according to some condition or predicate, like selection in relational algebra -A.B.C.D.E.F.G.H.I.J.K.L.M.N. A clause that is used to list the tables and any joins required in a query...
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...
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...
SQL (no outer joins or windows, please):
1. Find the number of movies per country (using nationality of
any actor in the movie). Note: you shouldn’t count movies twice; if
two or more actors from a country have appeared in a given movie,
make sure to count that movie only once.
Assume a database with schema ACTOR(name, age, address, nationality) MOVIE(title, year,genre, budget, director-name,studio) APPEARS(name, title,salary) where the table ACTOR contains information about actors and actresses, and name is the...
Create the database and tables
for the database. Show all SQL statements. Include primary and
foreign keys. Insert data into each table. Show select statements
and display the output of each table. Note:Student’s name must be
inserted into table as part of the data! Perform the SQL below:
Query one table and use WHERE to filter the results. The SELECT
clause should have a column list, not an asterisk (*). State the
purpose of the query; show the query and...
Form A Mid-Term Exam In ajoin, when using the ON keyword, column names need to be qualified only A in inner joins B. in outer joins c when the code is confusing D. when the same column names exist in both tables 7. Referring to the following code example and the data model the total number of rows returned by this query must equal SELECT vendor name, Invoice number FROM invoices LEFT JOIN vendors ON Invoices. vendor id = vendors.vendor...
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...
Problems and Exercises 1 through 9 are based on the dass scheduling
3NF relations along with some sample data shown in Figure 6-11.
Not shown in this figure are data for an ASSIGNMENT relation,
which represents a many-to-many relationship between faculty and
sections.4. Write SQL data definition commands for each of the following queries:a. How would you add an attribute, Class, to the Student
table?b. How would you remove the Registration table?c. How would you change the FacultyName field from...
Put all of your SQL code in a file named grades.sql and submit it below. Download the starter code, which contains import_grades.sql and the grades.csv file. Using he import_grades, sql file, create your database and table. - 0 eded. 1 T Une Modify the LOAD DATA INFILE to correct the path to load the grades.csv file, and add/remove LOCAL he only modification you may make to the import_grades.sql or the grades.csv files. The data represents grades for assignments in a...