Question: SQL ORACLE QUESTION Sunridge B&B wants to update its rack rates based on today's date. In other words, they want to find all the room

SQL ORACLE QUESTION

Sunridge B&B wants to update its rack rates based on today's date. In other words, they want to find all the room rates valid for today (where today's date falls within a RackRate Begin and End Date). Then, they want to increase their single room (RoomTypeID=1) rates 10% (Rounding up, using CEILING, to the nearest dollar) and decrease their other room rates (RoomTypeID's 3&4) 10% (Rounding down, using FLOOR, to the nearest dollar) for all their rooms. They also want to introduce a new student coupon of $35.50 off any stay over $200 (expires 7/31/2016). A student must currently be enrolled in CS 3550 to use this coupon. Write appropriate update and insert statements to make these adjustments. Select the results from the RackRates and Discount tables to show the changes.SQL ORACLE QUESTION Sunridge B&B wants to update its rack rates based

ResID IDENTITY 5000.1 Guest ID IDENTITY (1500,1) CREDITCARD uires RESERVATION PK CreditCardlD smallint has- ROOM TYPE PKK GuestID smallint FK1 GuestID smallint Reservation Date date CC Type varchar(5) varchar (20) PK BeomlypelD smallint ReservationStatus. char(1) GuestFirst CC Number varchar(16) ReservationComments varchar (200 GuestLast varchar(20) CC Company varchar(40) RTDescription varchar(2000 FK1 Credit CardID smallint GuestAddress1 varchar(30) CCCard Holder varchar(40) uestAddress2 varchar (10) CCExpiration smalldatetime F Res Status: CHECK R,A,C,X has GuestCity varchar(20) Guest State char (2 DISCOUNT GuestPostal Code char(10) RACKRATE PK Discount!D smallint Guestcountry varchar(20) has DPK RackBateID Smallint Guest Phone varchar(20) Gues Email varchar (30 DiscountDescription varchar(50) FK1 Room TypeID smallint GuestComments varchar (200) ontains DiscountExpiration date FK2 HotellD smallint DiscountRules varchar(100) Rack Rate smallmoney Percent cimal(4,2) ROOM Rack Rate Begin date DiscountAmount small money PK RoomID Smallint Rack Rate End date Rack Rate Description varchar(200) has Room Number varchar(5) RoomDescription varchar(200) has Room Smoking bit Hotell D is NOT an Identity FOLIO RoomBedConfiguration char(2) HOTEL assigned H PK FoliolD Smallint FK3 HotellD smallint -has PK HotelD small in FKA RoomTypeID smallint d Config FK1 ReservationID smallint GuestIDOTRIGGER smallint CHECK HotelName varchar(30) BILLING FK2 RoomID smallint K, Q,F,20, 2K,2F HotelAddress. varchar(30) Quote Rate Smallmoney HotelCity varchar(20) Check inDate smalldatetime HotelState char(2) has- Nights. tinyint HotelCountry varchar(20) FK1 FoliollD smallint Status char(1) HotelPostalCode char(10) FK2 BillingCategorylD smallint Comments varchar (200 Hotel StarRating char(1) BillingDescription char(30) FK3 Discount ID smallint BillingAmount small money Hotel PictureLink varchar (100) FK1 TaxLocationID mallint BillingltemQty tinyint Status: CHECK has Discount: DEFAULT BillingltemDate date R.A.CX located in PAYMENT PaymentID IDENTITY con ins (8000,1) EPK PaymentID Smallint TAXRATE BILLINGCATEGORY FK1 FoliollD smallint PK Billing CategoryID smallint PaymentDate date Tax Description varchar(30) PaymentAmount smallmoney BillingCatDescription varchar(30) aymentComments varchar(200) BillingCatTaxable Ver 1.1 6/5/2017

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!