Question
SQL outer join and nested query. a) Select the guest names and prices of the rooms they booked, if any. b) Select the guest names
SQL outer join and nested query.
a) Select the guest names and prices of the rooms they booked, if any.
b) Select the guest names and the overall prices of the rooms they booked, if any.
c) Create a new table staff with the attributes (staffNo,staffName,email,address,salary) and specify that staffNo is the primary key and staffName must be not null.
d) Insert some values into staff table as follows:
e) Show all staff names and guest names.
f) Select the name of someone who is both a staff and a guest using the intersect keywords. Is there some issue with this?
g) Select those staffs who are not guests.
h) Select all rooms with a price below half of the more expensive room.
i) Select all the guest names who have booked a room with a price above average.
j) Select the guest names who have booked more than 3 rooms.
New Query Results Messages staffNo address 1114567 Super Man Splder Man Dron Man 8012456 New Query Results Messages staffNo address 1114567 Super Man Splder Man Dron Man 8012456Step 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