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
What is the average room price in this inn?
assistant
SELECT AVG ( basePrice ) FROM Rooms;
human
Find all the rooms that cost more than that.
assistant
SELECT * FROM Rooms WHERE basePrice > ( SELECT AVG ( basePrice ) FROM Rooms ) ;
human
What are their room names?
assistant
SELECT roomName FROM Rooms WHERE basePrice > ( SELECT AVG ( basePrice ) FROM Rooms ) ;