2.99 See Answer

Question: Using the EMPLOYEE, JOB, and PROJECT tables

Using the EMPLOYEE, JOB, and PROJECT tables in the Ch07_ConstructCo database (see Figure P7.1), write the SQL code that will produce the results shown in Figure P7.16. Figure P7.1 Structure and contents of the Ch07_ConstructCo database
Using the EMPLOYEE, JOB, and PROJECT tables in the Ch07_ConstructCo database (see Figure P7.1), write the SQL code that will produce the results shown in Figure P7.16.

Figure P7.1 Structure and contents of the Ch07_ConstructCo database


Figure P7.16 The query results for Problem 16

Figure P7.16 The query results for Problem 16
Using the EMPLOYEE, JOB, and PROJECT tables in the Ch07_ConstructCo database (see Figure P7.1), write the SQL code that will produce the results shown in Figure P7.16.

Figure P7.1 Structure and contents of the Ch07_ConstructCo database


Figure P7.16 The query results for Problem 16





Transcribed Image Text:

Relational Diagram Database name: Ch07_ConstructCo Table name: EMPLOYEE EMP_NUM EMP_LNAME EMP_FNAME EMP_INITIAL EMP_HIREDATE JOB_CODE EMP_YEARS JOB ASSIGNMENT V ASSIGN_NUM ASSIGN_DATE PROJ_NUM V JOB_CODE JOB_DESCRIPTION 101 News John 08-Nov-00 502 12 JOB_CHG HOUR JOB_LAST_UPDATE 102 Senior David 12-Jul-89 501 23 00 EMP_NUM 103 Arbough Ramoras June E 01-Dec-96 503 16 ASSIGN_JOB ASSIGN_CHG_HR 104 Anne K 15-Nov-87 501 25 ASSIGN_HOURS 105 106 Johnson Alice K 01-Feb-93 502 19 ASSIGN_CHARGE EMPLOYEE 9 EMP NUM EMP INAME EMP FNAME EMPINITIAL EMP_HIREDATE PROJECT Smithfield William 22-Jun-04 500 8. V PROI_NUM 107 Alonzo Maria D. 10-Oct-93 500 19 PROJ_NAME 22-Aug-91 501 18-Jul-97 501 11-Dec-95 505 108 21 PROJ_VALUE PROJ_BALANCE Washington Smith Ralph Larry Gerald 109 15 EMP_NUM 110 Olenko A 17 JOB_CODE 111 Wabash Geoff 04-Apr-91 506 21 EMP YEARS 112 Smithson Darlene M 23-Oct-94 507 18 113 Joenbrood Delbert K 15-Nov-96 508 16 Table name: JOB 20-Aug-93 508 25-Jan-92 501 114 Jones Annelise 19 JOB_CHG_HOUR JOB_LAST_UPDATE 115 Bawangi Pratt 20 JOB_CODE JOB_DESCRIPTION Travis B Programmer 116 Gerald 05-Mar-97 510 15 500 35.75 20-Nov-15 117 Williamson Frommer 501 Systems Analyst 96.75 20-Nov-15 Angie H. 19-Jun-96 509 16 118 James J 04-Jan-05 510 502 Database Designer Electrical Engineer 125.00 24-Mar-16 503 84.50 20-Nov-15 504 Mechanical Engineer 67.90 20-Nov-15 Table name: ASSIGNMENT ASSIGN_NUM ASSIGN_DATE PROJ_NUM EMP_NUM ASSIGN_JOe ASSIGN_CHG_HR ASSIGN_HOURS ASSIGN_CHARGE 505 Civil Engineer 55.78 20-Nov-15 506 Clerical Support 26.87 20-Nov-15 1001 22-Mar-16 18 103 503 84.50 3.5 295.75 DSS Analyst Applications Designer Bio Technician 507 45.95 20-Nov-15 1002 22-Mar-16 22 117 509 34.55 4.2 145.11 508 48.10 24-Mar-16 1003 22-Mar-16 18 117 509 34.55 2.0 69.10 509 34.55 20-Nov-15 1004 22-Mar-16 18 103 503 84.50 5.9 498.55 510 General Support 18.36 20-Nov-15 1005 22-Mar-16 25 108 501 96.75 2.2 212.85 1006 22-Mar-16 22 104 501 96.75 4.2 406.35 Table name: PROJECT PROJ_NUM PROJ_NAME PROJ_VALUE Evergreen 1007 22-Mar-16 25 113 508 50.75 3.8 192.85 PROJ BALANCE EMP_NUM 1008 22-Mar-16 18 103 503 84.50 0.9 76.05 15 1453500.00 1002350.00 103 1009 23-Mar-16 15 115 501 96.75 5.6 541.80 18 Amber Wave 3500500.00 2110346.00 108 1010 23-Mar-16 15 117 509 34.55 2.4 82.92 22 Rolling Tide Starflight 805000.00 500345.20 102 1011 23-Mar-16 25 105 502 105.00 4.3 451.50 25 2650500.00 2309880.00 107 1012 23-Mar-16 18 108 501 96.75 3.4 328.95 1013 23-Mar-16 25 115 501 96.75 2.0 193.50 1014 23-Mar-16 22 104 501 96.75 2.8 270.90 1015 23-Mar-16 15 103 503 84.50 6.1 515.45 1016 23-Mar-16 22 105 502 105.00 4.7 493.50 1017 23-Mar-16 18 117 509 34.55 3.8 131.29 1018 23-Mar-16 25 117 509 34.55 2.2 76.01 1019 24-Mar-16 25 104 501 110.50 4.9 541.45 1020 24-Mar-16 15 101 502 125.00 3.1 387.50 1021 24-Mar-16 22 108 501 110.50 2.7 298.35 1022 24-Mar-16 22 115 501 110.50 4,9 541.45 1023 24-Mar-16 22 105 502 125.00 3.5 437.50 1024 24-Mar-16 15 103 503 84.50 3.3 278.85 1025 24-Mar-16 18 117 509 34.55 4.2 145.11 క్లిక్ కకికి కిి ికి PROJ_NAME PROJ_VALUE PROJ_BALANCE EMP LNAME EMP_FNAME EMP_INITIAL JOB_CODE JOB_DESCRIPTION JOB_CHG_HOUR Rolling Tide 805000.00 500345.20 Senior David H 501 Systems Analyst 96.75 Evergreen 1453500.00 1002350.00 Arbough June E 500 Programmer 35.75 Starflight 2650500.00 2309880.00 Alonzo Maria D 500 Programmer 35.75 Amber Wave 3500500.00 2110346.00 Washington Ralph 501 Systems Analyst 96.75


> Describe the three most common problems with concurrent transaction execution. Explain how concurrency control can be used to avoid those problems.

> Assuming that pessimistic locking with the two-phase locking protocol is being used, create a chronological list of the locking, unlocking, and data manipulation activities that would occur during the complete processing of the transaction described in P

> Assuming that pessimistic locking is being used, but the two-phase locking protocol is not, create a chronological list of the locking, unlocking, and data manipulation activities that would occur during the complete processing of the transaction describ

> Suppose you are a manufacturer of product ABC, which is composed of parts A, B, and C. Each time a new product is created, it must be added to the product inventory, using the PROD_QOH in a table named PRODUCT. And each time the product ABC is created, t

> Write the SQL code that will list only the distinct project numbers found in the EMP_2 table. Figure P7.9 The contents of the EMP_2 table EMP NUM EMP LNAME EMP_FNAME EMP_INITIAL EMP_HIREDATE JOB_CODE EMP_PCT PROJ_NUM 101 News John 08-Nov-00 502 5.0

> Starting with a consistent database state, trace the activities that are required to execute a set of transactions to produce an updated consistent database state.

> You have been assigned to design the database for a new soccer club. Indicate the most appropriate sequence of activities by labeling each of the following steps in the correct order. (For example, if you think that “Load the database” is the appropriate

> In a construction company, a new system has been in place for a few months and now there is a list of possible changes/updates that need to be done. For each of the changes/updates, specify what type of maintenance needs to be done: (a) Corrective, (b)

> Write the proper sequence of activities in the design of a video rental database. (The initial ERD was shown in Figure 9.9.) The design must support all rental activities, customer payment tracking, and employee work schedules, as well as track which emp

> Using the same procedures and concepts employed in Problem 1, how would you create an information system for the Tiny College example in Chapter 4?

> Suppose you perform the same functions Noted in Problem 2 for a larger warehousing operation. How are the two sets of procedures similar? How and why are they different?

> Suppose you have been asked to create an information system for a manufacturing plant that produces nuts and bolts of many shapes, sizes, and functions. What questions would you ask, and how would the answers to those questions affect the database design

> The ABC Car Service & Repair Centers are owned by the SILENT car dealer; ABC services and repairs only SILENT cars. Three ABC Car Service & Repair Centers provide service and repair for the entire state. Each of the three centers is independently managed

> Write the query that will write Oracle sequences to produce automatic customer number and invoice number values. Start the customer numbers at 1000 and the invoice numbers at 5000.

> Write the query that will show the invoice number, the invoice amount, the average invoice amount, and the difference between the average invoice amount and the actual invoice amount. (Figure P8.8) FIGURE P8.8 Invoice amounts compared to the average invo

> Write the query to show the invoice number, the customer number, the customer name, the invoice date, and the invoice amount for all customers with a customer balance of $1,000 or more. (Figure P8.7) FIGURE P8.7 Invoice of customers with a balance over $

> Write the SQL code that will produce a listing for the data in the EMP_2 table in ascending order by the bonus percentage. Figure P7.9 the contents of the EMP_2 table EMP NUM EMP LNAME EMP_FNAME EMP_INITIAL EMP_HIREDATE JOB_CODE EMP_PCT PROJ_NUM 10

> Write a query to display the lowest average cost of books within a subject and the highest average cost of books within a subject. (Figure P8.67) Figure P8.67 Lowest and highest average subject costs Lowest Avg Cost Highest Avg Cost 66.62 89.95

> Write a query to display the book number, title, subject, author last name, and the number of books written by that author. Limit the results to books in the Cloud subject. Sort the results by book title and then author last name. (Figure P8.66) Figur

> Write a query to display the book number, title, subject, average cost of books within that subject, and the difference between each book’s cost and the average cost of books in that subject. Sort the results by book title. (Figure P8.

> Write a query to display the author ID, first and last name for all authors that have never written a book with the subject Programming. Sort the results by author last name. (Figure P8.64) Figure P8.64 Authors that have never written on programming

> Write a query to display the book number, title, and cost of books that have the lowest cost of any books in the system. Sort the results by book number. (Figure P8.63) Figure P8.63 Least expensive books

> Write a query to display the patron ID and the average number of days that patron keeps books during a checkout. Limit the results to only patrons that have at least 3 checkouts. Sort the results in descending order by the average days the book is kept

> Write a query to display the average number of days a book is kept during a checkout. (Figure P8.61) Figure P8.61 Average days kept Average Days Kept 4.44

> Write a query to display the patron ID, last name, number of times that patron has ever checked out a book, and the number of different books the patron has ever checked out. For example, if a given patron has checked out the same book twice, that would

> Write the query that will generate only the records that are unique to the CUSTOMER_2 table. (Figure P8.6) Figure P8.6 Customers unique to the CUSTOMER_2 table CUST_LNAME CUST_FNAME McPherson Anne Kowalski Jan Chen George

> Write a query to display the patron ID, first and last name of all patrons that have never checked out any book. Sort the result by patron last name then first name. (Figure P8.59) Figure P8.59 Patrons that never checked out a book PAT ID PAT FNAM

> Write the SQL code to find the average bonus percentage in the EMP_2 table you created in Problem 8. Details from Problem 8: CREATE TABLE EMP_2 ( EMP_NUM CHAR(3) NOT NULL UNIQUE, EMP_LNAME VARCHAR(15) NOT NULL, EMP_FNAME VARCHAR(15) NOT NULL, EMP_I

> Write a query to display the author ID, author last name, book title, checkout date, and patron last name for all the books written by authors with the last name “Bruer” that have ever been checked out by patrons with

> Write a query to display the book number, title, and number of times each book has been checked out. Limit the results to books that have been checked out more than 5 times. Sort the results in descending order by the number of times checked out, and t

> Write a query to display the book number, title, and number of times each book has been checked out. Include books that have never been checked out. Sort the results in descending order by the number times checked out, then by title. (Figure P8.56) Figu

> Write a query to display the book number, title, author last name, author first name, patron ID, last name, and patron type for all books currently checked out to a patron. Sort the results by book title. (Figure P8.55) Figure P8.55 Currently checked ou

> Write a query to display the author ID, first and last name, book number, and book title of all books in the subject “Cloud”. Sort the results by book title and then by author last name. (Figure P8.54) Figure P8.54 Bo

> Write a query to display the book number and the number of times each book has been checked out. Do not include books that have never been checked out. (Figure P8.53) Figure P8.53 Times checked out BOOK NUM Times Checked Out 5236 12 5235 9 5240 52

> Write a query to display the patron ID, full name (first and last), and patron type for all patrons. Sort the results by patron type, then by last name and first name. Ensure that all sorting is case insensitive. (Figure P8.52) Figure P8.52 Sorted patr

> Write a query to display the patron ID, book number, patron first name and last name, and book title for all currently checked out books. (Remember to use the redundant relationship described in the assignment instructions for current checkouts.) Sort t

> Write a query to display the author last name, first name, book title, and year for each book. (Figure P8.50) Figure P8.50 Author name and book title AU LNAME AU FNAME BOOK TITLE BOOK YEAR Durante Reba Beginner's Guide to JAVA 2012 Walsh Neal Datab

> Write the query that will show only the duplicate customer records. (Figure P8.5) Figure P8.5 Duplicate customer records CUST LNAME CUST FNAME Ortega Juan

> Write the SQL code that will produce a virtual table named REP_1. The virtual table should contain the same information that was shown in Problem 16. Details from Problem 16: Figure P7.16 The query results for Problem 16 PROJ_NAME PROJ_VALUE PROJ_BA

> Write a query to display the author ID, book number, title, and year for each book. (Figure P8.49) Figure P8.49 Authors of books BOOK YEAR AU ID BOOK NUM 273 BOOK TITLE 5235 Beginner's Guide to JAVA 2012 383 5236 Database in the Cloud 2012 5237 Mas

> Write a query to display the author last name, author first name, and book number for each book written by that author. (Figure P8.48) Figure P8.48 Books written by author AU LNAME AU FNAME BOOK NUM Reeves Benson 5237 Reeves Benson 5253 Beatney Sal

> Write a query to display the book number, title with year, and subject for each book. (Figure P8.47) Figure P8.47 Book title with year BOOK NUM BOOK BOOK SUBJECT 5235 Beginner's Guide to JAVA (2012) 5236 Database in the Cloud (2012) Programming Clo

> Write a query to display the patron ID, patron full name, and patron type for each patron. (Figure P8.46) Figure P8.46 Patron and patron type РАT ID Patron Name PAT TYPE 1160 robert carter Faculty Faculty Faculty Student 1161 Kelsey Koch 1165 Cedri

> Write a query to display the patron ID, book number, and days kept for each checkout. “Days Kept” is the difference from the date on which the book is returned to the date it was checked out. (Figure P8.45) Figure P8.

> Write a query to display all rows in the PATRON table. Figure P8.44 Ch08_FACT ERD CHECKOUT PATRON PK Check Num PK Pat ID FK1 Book_Num FK2 Pat_ID Check_Out_Date Check_Due_Date Check_In_Date ---H- Pat_FName Pat_LName Pat_Type BOOK AUTHOR РК Book Num P

> Create a trigger named trg_cust_balance that will automatically update the CUSTOMER table’s CUST_BALANCE when a new CHARTER row is added. Use the CHARTER table’s CHAR_TOT_CHG as the update source (Assume that all charter charges are charged to the custom

> Create a trigger named trg_pic_hours that will automatically update the PILOT table when a new CREW row is added and the CREW table uses a ‘pilot’ CREW_JOB entry. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the PILOT table’s PIL_PIC_HRS only when

> Create a trigger named trg_char_hours that will automatically update the AIRCRAFT table when a new CHARTER row is added. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the AIRCRAFT table’s AC_TTAF, AC_TTEL, and AC_TTER values. Table P8.34 Attribute

> Modify the PILOT table to add the attribute shown in the following table. Table P8.40 The New Attribute for the PILOT Table Attribute name Attribute Description Attribute type  PIL_PIC_HRS Pilot in command (PIC) hours. Updated by adding the CHARTER

> Write the query that will generate a combined list of customers to include the duplicate customer records. (Figure P8.4) Figure P8.4 Combined list of customers with duplicates CUST LNAME CUST FNAME Smith Jeanne Ortega Juan McPherson Anne Ortega Juan

> Write the command required to update the CHAR_TOT_CHG attribute values in the CHARTER table. Table P8.34 Attribute name Attribute Description Attribute type  CHAR_WAIT_CHG Waiting charge for each model (copied from the MODEL table.) Numeric  CHA

> Write the command required to update the CHAR_TAX_CHG attribute values in the CHARTER table. Table P8.34 Attribute name Attribute Description Attribute type  CHAR_WAIT_CHG Waiting charge for each model (copied from the MODEL table.) Numeric  CHA

> Write the command required to update the CHAR_FLT_CHG attribute values in the CHARTER table. Table P8.34 Attribute name Attribute Description Attribute type  CHAR_WAIT_CHG Waiting charge for each model (copied from the MODEL table.) Numeric  CHA

> Write the sequence of commands required to update the CHAR_FLT_CHG_HR attribute values in the CHARTER table. Hint: Use either an updatable view or a stored procedure. Table P8.34 Attribute name Attribute Description Attribute type  CHAR_WAIT_CHG Wa

> Write the sequence of commands required to update the CHAR_WAIT_CHG attribute values in the CHARTER table. Hint: Use either an updatable view or a stored procedure. Table P8.34 Attribute name Attribute Description Attribute type  CHAR_WAIT_CHG Wait

> Modify the CHARTER table to add the attributes shown in the following table. Table P8.34 The New Attributes for the CHARTER Table Attribute name Attribute Description Attribute type  CHAR_WAIT_CHG Waiting charge for each model (copied from the MOD

> Write the queries to update the MOD_WAIT_CHG attribute values based on problem 32. Details from problem 32: Table P8.32 The New Attribute for the MODEL Table Attribute name Attribute Description Attribute type Attribute Values  MOD_WAIT_CHG Waitin

> Modify the MODEL table to add the following attribute and insert the values shown in Table P8.23. Table P8.32 The New Attribute for the MODEL Table Attribute name Attribute Description Attribute type Attribute Values  MOD_WAIT_CHG Waiting charge p

> Create a procedure named prc_cus_balance_update that will take the invoice number as a parameter and update the customer balance. (Hint: You can use the DECLARE section to define a TOTINV numeric variable that holds the computed invoice total.) Use the C

> Write the SQL code required to list all employees whose last names start with Smith. In other words, the rows for both Smith and Smithfield should be included in the listing. Assume case sensitivity. EMP NUM EMP LNAME EMP FNAME EMP INITIAL EMP HIRED

> Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invoice number as a parameter. The INV_SUBTOTAL is the sum of the LINE_TOTAL amounts for the invoice, the INV_TAX is the product o

> Write the query that will generate a combined list of customers (from tables CUSTOMER and CUSTOMER_2) that do not include the duplicate customer records. Only the customer named Juan Ortega shows up in both customer tables. (Figure P8.3) Figure P8.3 Comb

> Create a trigger named trg_line_prod that will automatically update the product quantity on hand for each product sold after a new LINE row is added. Use the Ch08_SaleCo2 database Database name: Ch08_SaleCo2 Table name: CUSTOMER CUS CODE CUS_LNAME C

> Create a trigger named trg_line_total to write the LINE_TOTAL value in the LINE table every time you add a new LINE row. (The LINE_TOTAL value is the product of the LINE_UNITS and the LINE_PRICE values.) Use the Ch08_SaleCo2 database Database name:

> The purchasing manager is still concerned about the impact of price on sales. Write a query to display the brand name, brand type, product SKU, product description, and price of any products that are not a premium brand, but that cost more than the most

> One of the purchasing managers is interested in the impact of product prices on the sale of products of each brand. Write a query to display the brand name, brand type, average price of products of each brand, and total units sold of products of each bra

> LargeCo is planning a new promotion in Alabama (AL) and wants to know about the largest purchases made by customers in that state. Write a query to display the customer code, customer first name, last name, full address, invoice date, and invoice total o

> Write a query to display the customer code, first name, and last name of all customers who have had at least one invoice completed by employee 83649 and at least one invoice completed by employee 83677. Sort the output by customer last name and then firs

> The Binder Prime Company wants to recognize the employee who sold the most of their products during a specified period. Write a query to display the employee number, employee first name, employee last name, e-mail address, and total units sold for the em

> Write a query to display the invoice number, line numbers, product SKUs, product descriptions, and brand ID for sales of sealer and top coat products of the same brand on the same invoice. (Figure P8.22) Figure P8.22 Invoices for sealer and top coat of t

> Write the SQL command that will delete the newly created TEMP_1 table from the database.

> Write a query to display the starting salary for each employee. The starting salary would be the entry in the salary history with the oldest salary start date for each employee. Sort the output by employee number. (Figure P8.21) Figure P8.21 Starting sal

> Write a query to display the current salary for each employee in department 300. Assume that only current employees are kept in the system, and therefore the most current salary for each employee is the entry in the salary history with a NULL end date. S

> Insert the data into the tables you created in Problem 1. Figure P8.1 Ch08_SimpleCo Database Tables Database name: Ch08_SimpleCo Table name: CUSTOMER Table name: INVOICE CUST_NUM CUST_LNAME CUST_FNAME CUST_BALANCE 1000 Smith 1001 Ortega |INV_NUM CUS

> Write a query to display the products that have a price greater than $50. Figure P8.19 Ch08_SaleCo2 Database Tables LGCUSTOMER LGBRAND PK Cust Code |Рк |Brand ID Cust_Fname Cust_Lname Cust_Street Cust_City Cust_State Cust_ZIP Cust Balance Brand_Name

> Write a procedure to delete an invoice given the invoice number as a parameter. Name the procedure prc_inv_delete. Test the procedure by deleting invoices 8005 and 8006.

> Write a trigger to update the customer balance when an invoice is deleted. Name the trigger trg_updatecustbalance2.

> Write a procedure to add a new invoice record to the INVOICE table. Use the following values in the new record: 8006, 1000, ’30-APR-16’, 301.72 Name the procedure prc_invoice_add. Run a query to see if the record has been added.

> Write a procedure to add a new customer to the CUSTOMER table. Use the following values in the new record: 1002, ‘Rauthor’, ‘Peter’, 0.00 Name the procedure prc_cust_add. Run a query to see if the record has been added.

> Write the trigger to update the CUST_BALANCE in the CUSTOMER table when a new invoice record is entered. (Assume that the sale is a credit sale.) Test the trigger using the following new INVOICE record: 8005, 1001, ’27-APR-16’, 225.40 Name the trigger tr

> Write the query that will list the average age of your customers. (Assume that the CUSTOMER table has been modified to include the CUST_DOB and the derived CUST_AGE attribute.)

> Write the two SQL command sequences required to: a. Create a temporary table named TEMP_1 whose structure is composed of the EMP_2 attributes EMP_NUM and EMP_PCT. b. Copy the matching EMP_2 values into the TEMP_1 table. EMP NUM EMP LNAME EMP FNAME E

> Assuming the CUSTOMER table contains a CUST_AGE attribute, write the query to update the values in that attribute.

> Assuming you completed problem 10, write the query that will list the names and ages of your customers.

> Modify the CUSTOMER table to included two new attributes: CUST_DOB and CUST_AGE. Customer 1000 was born on March 15, 1979, and customer 1001 was born on December 22, 1988.

> Create the tables. (Use the MS Access example shown in Figure P8.1 to see what table names and attributes to use.) Figure P8.1 Ch08_SimpleCo Database Tables Database name: Ch08_SimpleCo Table name: CUSTOMER Table name: INVOICE CUST_NUM CUST_LNAME CU

> Write a query to display the movie number, movie genre, average movie cost of movies in that genre, movie cost of that individual movie, and the percentage difference between the average movie cost and the individual movie cost (result shown in Figure P7

> Write a query to display the rental number, rental date, movie title, and detail fee for each movie that was returned on or before the due date (result shown in Figure P7.124). Figure P7.124 Actual rental fees charged Rent Num Rent Date Movie T

> Write a query to display the rental number, rental date, video number, movie title, due date, and return date for all videos that were returned after the due date. Sort the results by rental number and movie title (result shown in Figure P7.123). Figur

> Write a query to display the minimum balance, maximum balance, and average balance for memberships that have a rental (result shown in Figure P7.122). Figure P7.122 Minimum, maximum, and average balances Minimum Balance Maximum Balance Average Bal

> Write a query to display the membership number, first name, last name, and balance of the memberships that have a rental (result shown in Figure P7.121). Figure P7.121 Balances of memberships with rentals Mem Num Mem FName Mem LName Mem Balance 10

> Write a query to display the movie title, price description, and price rental fee for all movies that are in the genres Family, Comedy, or Drama (result shown in Figure P7.120). Figure P7.120 Movies with specific genres Movie Title Price Description

> What is the relationship between a database and an information system, and how does this relationship have a bearing on database design?

> Write a query to display the movie title, movie genre, and movie cost for all movies that have a cost between $44.99 and $49.99 (result shown in Figure P7.119). Figure P7.119 Movies costs within a range Movie_Title Movie_Genre Movie_Cost Time to Bur

> Write a query to display the movie title and movie year for all movies that have a price code (result shown in Figure P7.118). P7.118 Movies with a price Movie Title The Cesar Family Christmas Smokey Mountain Wildlife Richard Goodhope Beatnik Fever

> Write a query to display the movie title and the movie cost divided by the price rental fee for each movie that has a price to determine the number of rentals it will take to break even on the purchase of the movie (result shown in Figure P7.117). Figure

> Write a query to display the movie genre and average price rental fee for movies in each genre that have a price (result shown in Figure P7.116). Figure P7.116 Average rental fee by genre Movie Genre Average Rental Fee АCTION 2 COMEDY 3.25 DRAM

> Write a query to display the movie title, movie genre, price description, and price rental fee for all movies with a price code (result shown in Figure P7.115). Figure P7.115 Rental fees for movies Movie Title Movie Genre Price Description Price Ren

> Write a query to display the movie genre and average cost of movies in each genre (result shown in Figure P7.114). Figure P7.114 Average movie cost by genre Movie Genre Average Cost АCTION 52.72 COMEDY 44.12 DRAMA 58.46 FAMILY 39.95

> Write a query to display the average cost of all of the movies (result shown in Figure P7.113). Figure P7.113 Average movie cost Average Movie Cost 51.1275

2.99

See Answer