human
Schema:
Rooms (RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor)
Reservations (Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids)
Please answer with SQL.
assistant
Sure, I understand.
human
which one of these rooms has reservations?
assistant
SELECT * FROM rooms WHERE roomid IN ( SELECT DISTINCT room FROM reservations );
human
What about the rooms which do not have reservations?
assistant
SELECT * FROM rooms WHERE roomid NOT IN ( SELECT DISTINCT room FROM reservations ) ;