Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

What is the submission deadline for the final report?

Answered: 1 week ago