Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could any one please answer the question. Please reply as soonas possible. Thank

ID: 3613938 • Letter: C

Question

Could any one please answer the question. Please reply as soonas possible. Thank you Given the Data Base Scheme as following, Please finish thefollowing SQL's Hotel (hotelNo, hotelName, City) Room (roomNo, hotelNo, type, price) Booking(hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest(guestNo, guestName, guestAddress) i.) List the bookings for which no date to has beenspecified. ii.) What is average price of room? iii.) How many different guest have made bookings forAugust? Could any one please answer the question. Please reply as soonas possible. Thank you Given the Data Base Scheme as following, Please finish thefollowing SQL's Hotel (hotelNo, hotelName, City) Room (roomNo, hotelNo, type, price) Booking(hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest(guestNo, guestName, guestAddress) i.) List the bookings for which no date to has beenspecified. ii.) What is average price of room? iii.) How many different guest have made bookings forAugust?

Explanation / Answer

1.select * from Booking
where dateTo is NULL;(try to search for the NULL value asdate)

2.select avg(price )
from Room group by price ;

3.select Guest.guestNo fromGuest,Booking
where Booking.dateFrom=august;
(here you can compare the date accrding the format)