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
Create a query based on tblReservations that displays the guests that have reservations for all rooms except for any type of double room and who have an AAA, AARP, or Military (enter criteria in that order) discount. The query results should display GuestID, CheckInDate, RoomType, RoomRate, and DiscountType in that order
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
- Management is considering closing on Sundays and would like to have a feeling for the kinds of customers that come to the dealership on Sunday. Create a totals query that shows the count of encounters on the Sundays of July 2015—grouped by the credit description held by the customer of the encounter. The Sundays in July of 2015 are the 5th, 12th, 19th, and 26th. Your answer should have two columns (CreditDescription and encounter_count) and should be sorted alphabetically by credit description.arrow_forward1 rows returned in 0.00 seconds Download 7. In the OrderItems table, display the maximum item_price with the alias shown. 11.99 1 rows returned in 0.00 seconds Download Max Item Pricearrow_forwardWrite a query that uses INNER JOIN TO connect the EMPLOYEE, EMPPROJACT, PROJACT and PROJECT tables. Include the Project number , Department number, Project start and end date and AC STAFF WHERE They belong to department D11 , Salary is more than or equal to 65 percent of $15,000 AND Salary is less than or equal to 130 percent of $40,000arrow_forward
- Which clause can be used to restrict or filter the groups returned by a group function- based query?arrow_forward1) Rewrite the query below to use GROUP BY CUS_CODE : SELECT CUSTOMER.CUS_CODE, CUSTOMER.CUS_LNAME, INVOICE.INV_NUMBER, INVOICE.INV_DATEFROM CUSTOMER INNER JOIN INVOICE ON CUSTOMER.CUS_CODE = INVOICE.CUS_CODE; 2) Rewrite the query below to include line items of each invoice : SELECT CUSTOMER.CUS_CODE, CUSTOMER.CUS_LNAME, INVOICE.INV_NUMBER, INVOICE.INV_DATEFROM CUSTOMER INNER JOIN INVOICE ON CUSTOMER.CUS_CODE = INVOICE.CUS_CODE; 3) Rewrite the query from 2) to show only the customers who bought a product priced higher than $100, which product, what price, how many units, and when.arrow_forwardDisplay the first 10 rows of the invoice number, 2 line numbers, 2 product SKUs, 2 product descriptions, and brand ID for the sales of “sealer” and “top-coat” related products of the same brand on the same invoice sorted by the invoice number. (See partial result below, it has only 2 rows) Hints: Assign two different alias to both the"lin" and "product" tables. Then do the joins treating them as 4 differnet tables.arrow_forward
- Reference table 6-28. Include both SQL commands and results/answers in your answers. In the NONCAT table, increase the price of each item in category BRD by five percent. (Hint: Multiply each price by 1.05.) In the NONCAT table, increase the length of the DESCRIPTION column to 40 characters.arrow_forwardManagement is considering closing on Sundays and would like to have a feeling for the kinds of customers that come to the dealership on Sunday. Create a totals query that shows the count of encounters on the Sundays of July 2015—grouped by the credit description held by the customer of the encounter. The Sundays in July of 2015 are the 5th, 12th, 19th, and 26th. Your answer should have two columns (CreditDescription and encounter_count) and should be sorted alphabetically by credit description. This is what Ive been working with and doesn't give me results, just error messages. SELECT R.CreditDescription, E.CustomerID FROM Encounter E JOIN Customer C ON E.CustomerID = C.CustomerID JOIN CreditRating R ON C.CreditID = R.CreditID WHERE E.EncDate = STR_TO_DATE('2015-07-05','2015-07-12','2015-07-19','2015-07-26'); ORDER BY creditrating.creditid, ASC; creditrating creditid creditdescription minfico maxfico comments customer customerid cfirstname clastname…arrow_forwardThe Colombia City office of StayWell indicated that there is a new tenant by the name of Yigit Yilmaz staying at the property with an ID of 13. You need to include this new resident in the RESIDENTS table.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_forwardIn the BOOK_PRICING database, the Category field should be marked as obsolete. Make sure the column has been marked as unavailable.arrow_forwardCreate a query to find the balance characteristics for all customers, including the total of the outstanding balances. The results of this query are shown in Figure P7.22. make sure the decimal are the samearrow_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