
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
thumb_up100%
Task 2: Write and execute the command to retrieve the office number, property ID, and monthly rent for every property in the SMALL_PROPERTY view with a monthly rent of $1150 or more.
This is my response. However it isn't working when I check the file. Also the table isn't popping up like the other completed queries, can you let me know where I went wrong and provide correct reponse. Thanks,
CREATE VIEW TASK2 AS
SELECT OFFICE_NUM, PROPERTY_ID, MONTHLY_RENT
FROM SMALL_PROPERTY
WHERE MONTHLY_RENT < 1150;
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 1)To list the number of equipment with the same first three letters (the start code, e.g., CAM, DIV) in the equipment code for equipment loaned or returned in the month of June. You should list the start code and the number of equipment types ONLY if there is more than 2 such equipment with the start code.2) Create a view named CustomerSummary with details of each customer, the number of equipment rented, the total amount of rental collected thus far and the number of damages caused by customer and not due to wear and tear.3) Use the CustomerSummary view to find the average rental per loan for the customer with the most number of loans. Do not hardcode any value and do not assume that the loan table is non-empty or that there is one row of result as ingeneral, there may be more than one customers with the most number of loans.arrow_forwardTask 7: Create a view named MONTHLY_RENTS. It consists of three columns: the first is the number of bedrooms, the second is the average square feet, and the third is the average monthly rent for all properties in the PROPERTY table that have that number of bedrooms. Use BEDROOMS, AVG_SQUARE_FEET, and AVG_MONTHLY_RENT as the column names. Group and order the rows by number of bedrooms. Task 8: Write and execute the command to retrieve the average square footage and average monthly rent for each property for which the average monthly rent is greater than $1,400.arrow_forwardCreate a view named Refill_Due. It should consist of the patient id, dateofvisit, rxid, and the dosage for every medicine prescribed that requires refilling. Prefix the columns in the view with “RD”. For example, the PATIENTID in the table becomes RD_PATIENTID in the view. Use select statement to display the records from the view just created. See the output below and match your results to the sample output.arrow_forward
- Write and execute the command to retrieve the item ID, description, invoice number, and quoted price for all invoices in the ITEM_INVOICE VIEW for items with a quoted prices that exceed $100. I have been trying this solution and it is incorrect: SELECT i.item_id, i.description, l.invoice_num, l.quoted_priceFROM item iINNER JOIN invoice_line l ON i.item_id = l.item_idWHERE i.item_id IN ( SELECT item_id FROM item_invoice WHERE quoted_price > 100);arrow_forwardWhat is the difference between simple view and 'With Check Option'arrow_forwardCreate a view name TopLevelCust view. It consists of the number, name, address, balance, and credit limt of clients with credit limits that are greater that or equal to $10,000.arrow_forward
- Create a view named ITEM_INVOICE. It consists of the item ID, description, price, invoice number, invoice date, number ordered, and quoted price for all invoice lines currently on file.arrow_forwardWhen should the VALUES clause be omitted from the INSERT INTO command?arrow_forward1. Create a SELECT statement that returns the order number and date for all records in the ORDERS table. Using an inner join, include the customer name and email address associated with each order.arrow_forward
- Create a view named ORDER_TOTAL. It consists of the order number and order total for each order currently on file. (The order total is the sum of the number of units ordered multiplied by the quoted price on each order line for each order.) Sort the rows by order number. Use TOTAL_AMOUNT as the name for the order total. a.Write and execute the CREATE VIEW command to create the ORDER_TOTAL view. b.Write and execute the command to retrieve the order number and order total for only those orders totaling more than $500. c.Write and execute the query that the DBMS actually executes. d.Does updating the database through this view create any problems? If so, what are they? If not, why not?arrow_forwardTask 5: Write and execute the command to retrieve the item ID, description, invoice number, and quoted price for all invoices in the ITEM_INVOICE VIEW for items with a quoted prices that exceed $100.arrow_forwardI am working on Task 7. Task 7: Create a view named MONTHLY_RENTS. It consists of three columns: the first is the number of bedrooms, the second is the average square feet, and the third is the average monthly rent for all properties in the PROPERTY table that have that number of bedrooms. Use BEDROOMS, AVG_SQUARE_FEET, and AVG_MONTHLY_RENT as the column names. Group and order the rows by number of bedrooms. Here is Tasks 1-7 and what I wrote for Task 8. When I input Task 8, I am not getting results at all. Expected Results Tables_in_StayWell Table_type MONTHLY_RENTS VIEWarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education