Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write SQL code for the following queries tables are tblGuest, tblPropertybackup, tblPersonnel, tblReservation, tblWork 1) Returns all guests with reservations 2) Returns all distinct guests
write SQL code for the following queries
tables are tblGuest, tblPropertybackup, tblPersonnel, tblReservation, tblWork
1)Returns all guests with reservations
2)Returns all distinct guests with reservations
3)Returns guestid, FirstName, Lastname, Reservationid, propertyname
4)Returns all guests without reservations
5)Properties without reservations
dbo.tblGuest Columns GuestID (nvarchar(3), null) GuestFirstName (nvarchar(20), null) GuestLastName (nvarchar(25), null) Address (nvarchar(32), null) City (nvarchar(24), null) StateProv (nvarchar(2), null) Postal Code (nvarchar(10), null) Country (nvarchar(15), null) Phone (nvarchar(14), null) dbo.tblReservation Columns ReservationID (nvarchar(3), null) GuestID (nvarchar(3), null) PropertyID (nvarchar(4), null) StartDate (datetime, null) EndDate (datetime, null) People (smallint, null) RentalRate (money, null) Kevs + dbo.tblProperty Columns PropertyID (nvarchar(4), null) PropertyName (nvarchar(45), null) Location (nvarchar(35), null) Country (nvarchar(15), null) NightlyRate (money, null) Bedrooms (smallint, null) Sleeps (smallint, null) Property Type (nvarchar(20), null) Description (nvarchar(max), null) dbo.tblPersonnel Columns PersonlD (nvarchar(6), null) FirstName (nvarchar(14), null) LastName (nvarchar(14), null) Job Title (nvarchar(22), null) Manager (nvarchar(6), null)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started