Using a SQL query on the CSV that have their own contained table Find all reservations in room HBB that overlap by at least one day with any stay by customer with last name KNERIEN. Last last and first name along with checkin and checkout dates. Sort by checkin date in chronological order. ---------------------------------------------------------------------------------------------- Rooms.csv RoomId : a three-letter unique Id code of a room roomName : official name of the room beds : number of beds in the room bedType : type of the bed(s) in the room. All beds in each room are of the same type. maxOccupancy : maximum number of people allowed to stay in the room basePrice : base price (in US dollars) of one night of stay in the room. decor : decoration style of the room -------------------------------------------------------------------------------------------- Reservations.csv Code : reservation code Room : the three-letter room code (see Rooms.RoomId) CheckIn : date of check-in/arrival CheckOut : date of check-out/departure Rate : actual nightly rate. Each night of stay on one reservation always costs the same amount, although rates may vary for the same room from one reservation to another LastName : last name of the person who made the reservation FirstName : first name of the person who made the reservation Adults : number of adults (18 and above) staying in the room. Each reservation must have at least one adult Kids : number of kids (ages 0-17) staying in the room.
Using a SQL query on the CSV that have their own contained table
Find all reservations in room HBB that overlap by at least one day with any stay by customer with last name KNERIEN. Last last and first name along with checkin and checkout dates. Sort by checkin date in chronological order.
----------------------------------------------------------------------------------------------
Rooms.csv
RoomId : a three-letter unique Id code of a room
roomName : official name of the room
beds : number of beds in the room
bedType : type of the bed(s) in the room. All beds in each room
are of the same type.
maxOccupancy : maximum number of people allowed to stay in the room
basePrice : base price (in US dollars) of one night of stay in the room.
decor : decoration style of the room
--------------------------------------------------------------------------------------------
Reservations.csv
Code : reservation code
Room : the three-letter room code (see Rooms.RoomId)
CheckIn : date of check-in/arrival
CheckOut : date of check-out/departure
Rate : actual nightly rate. Each night of stay on one reservation
always costs the same amount, although rates may vary
for the same room from one reservation to another
LastName : last name of the person who made the reservation
FirstName : first name of the person who made the reservation
Adults : number of adults (18 and above) staying in the room. Each
reservation must have at least one adult
Kids : number of kids (ages 0-17) staying in the room.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps